From 25f917688c6b0ab121e956b1d1bf57c057199576 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Thu, 8 May 2014 21:15:09 +0200 Subject: [PATCH] Fix CodeSniffer errors and warnings in includes/utils/ Change-Id: I5e59dd8136fcbd8dc833d7c9f6288656e13df6e9 --- includes/utils/ArrayUtils.php | 4 +++- includes/utils/Cdb.php | 3 ++- includes/utils/UIDGenerator.php | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/includes/utils/ArrayUtils.php b/includes/utils/ArrayUtils.php index 037663c292..b6df18b682 100644 --- a/includes/utils/ArrayUtils.php +++ b/includes/utils/ArrayUtils.php @@ -109,7 +109,9 @@ class ArrayUtils { * @return int|bool The item index of the lower bound, or false if the target value * sorts before all items. */ - public static function findLowerBound( $valueCallback, $valueCount, $comparisonCallback, $target ) { + public static function findLowerBound( $valueCallback, $valueCount, + $comparisonCallback, $target + ) { if ( $valueCount === 0 ) { return false; } diff --git a/includes/utils/Cdb.php b/includes/utils/Cdb.php index f556ee7af7..b16d4a4df9 100644 --- a/includes/utils/Cdb.php +++ b/includes/utils/Cdb.php @@ -158,4 +158,5 @@ abstract class CdbWriter { * Exception for Cdb errors. * This explicitly doesn't subclass MWException to encourage reuse. */ -class CdbException extends Exception {} +class CdbException extends Exception { +} diff --git a/includes/utils/UIDGenerator.php b/includes/utils/UIDGenerator.php index c7bb4f3ccb..e2013b05cf 100644 --- a/includes/utils/UIDGenerator.php +++ b/includes/utils/UIDGenerator.php @@ -278,7 +278,9 @@ class UIDGenerator { if ( ( $flags & self::QUICK_VOLATILE ) && PHP_SAPI !== 'cli' ) { try { $cache = ObjectCache::newAccelerator( array() ); - } catch ( MWException $e ) {} // not supported + } catch ( MWException $e ) { + // not supported + } } if ( $cache ) { $counter = $cache->incr( $bucket, $count ); -- 2.20.1