From: Ricordisamoa Date: Fri, 14 Aug 2015 21:17:01 +0000 (+0200) Subject: Fix some space-related phpcs warnings in includes/ X-Git-Tag: 1.31.0-rc.0~10414 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=df9ebe6f993babbab6f831f9ab89e3c03e94809c;p=lhc%2Fweb%2Fwiklou.git Fix some space-related phpcs warnings in includes/ Change-Id: I7cf7206696a5e77bc02e3630d1d88d4c176ea844 --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index f90f91bd23..8d4720b610 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -3146,7 +3146,7 @@ class OutputPage extends ContextSource { // Already handled by getExternalHeadScripts() return ''; } - return $this->getScriptsForBottomQueue(); + return $this->getScriptsForBottomQueue(); } /** diff --git a/includes/WebStart.php b/includes/WebStart.php index 80db15b139..f5a4f93bb3 100644 --- a/includes/WebStart.php +++ b/includes/WebStart.php @@ -140,4 +140,4 @@ if ( !defined( 'MW_NO_SETUP' ) ) { # Multiple DBs or commits might be used; keep the request as transactional as possible if ( isset( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] === 'POST' ) { ignore_user_abort( true ); -} \ No newline at end of file +} diff --git a/includes/dao/DBAccessObjectUtils.php b/includes/dao/DBAccessObjectUtils.php index 58f991fc10..ad7804c21b 100644 --- a/includes/dao/DBAccessObjectUtils.php +++ b/includes/dao/DBAccessObjectUtils.php @@ -56,4 +56,4 @@ class DBAccessObjectUtils { return array( $index, $options ); } -} \ No newline at end of file +} diff --git a/includes/exception/MWExceptionHandler.php b/includes/exception/MWExceptionHandler.php index 663b0fff81..def653fb30 100644 --- a/includes/exception/MWExceptionHandler.php +++ b/includes/exception/MWExceptionHandler.php @@ -562,7 +562,7 @@ TXT; $json = self::jsonSerializeException( $e, false, FormatJson::ALL_OK ); if ( $json !== false ) { $logger = LoggerFactory::getInstance( "{$channel}-json" ); - $logger->error( $json, array( 'private' => true ) ); + $logger->error( $json, array( 'private' => true ) ); } Hooks::run( 'LogException', array( $e, $suppressed ) ); diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php index 18529126e0..6a2c0640be 100644 --- a/includes/filerepo/LocalRepo.php +++ b/includes/filerepo/LocalRepo.php @@ -595,7 +595,7 @@ class LocalRepo extends FileRepo { wfDebug( __METHOD__ . ": skipped because storage uses sha1 paths\n" ); return Status::newGood(); } else { - return call_user_func_array('parent::' . $function, $args ); + return call_user_func_array( 'parent::' . $function, $args ); } } } diff --git a/includes/installer/PostgresUpdater.php b/includes/installer/PostgresUpdater.php index 4410271d2f..e1063b0fe4 100644 --- a/includes/installer/PostgresUpdater.php +++ b/includes/installer/PostgresUpdater.php @@ -408,7 +408,7 @@ class PostgresUpdater extends DatabaseUpdater { array( 'changeFieldPurgeTable', 'l10n_cache', 'lc_value', 'bytea', "replace(lc_value,'\','\\\\')::bytea" ), // 1.23.9 - array( 'rebuildTextSearch'), + array( 'rebuildTextSearch' ), // 1.24 array( 'addPgField', 'page_props', 'pp_sortkey', 'float NULL' ), diff --git a/includes/libs/SamplingStatsdClient.php b/includes/libs/SamplingStatsdClient.php index d7791a87a6..f7afdb5e13 100644 --- a/includes/libs/SamplingStatsdClient.php +++ b/includes/libs/SamplingStatsdClient.php @@ -43,7 +43,7 @@ class SamplingStatsdClient extends StatsdClient { if ( $item->getSampleRate() === 1 ) { $item->setSampleRate( $sampleRate ); } - }); + } ); } return $data; diff --git a/includes/media/WebP.php b/includes/media/WebP.php index 05d12c484f..ff4dcee23e 100644 --- a/includes/media/WebP.php +++ b/includes/media/WebP.php @@ -219,8 +219,8 @@ class WebPHandler extends BitmapHandler { return array( 'compression' => 'unknown', - 'animated' => ($flags[1] & self::VP8X_ANIM) == self::VP8X_ANIM, - 'transparency' => ($flags[1] & self::VP8X_ALPHA) == self::VP8X_ALPHA, + 'animated' => ( $flags[1] & self::VP8X_ANIM ) == self::VP8X_ANIM, + 'transparency' => ( $flags[1] & self::VP8X_ALPHA ) == self::VP8X_ALPHA, 'width' => ( $width[1] & 0xFFFFFF ) + 1, 'height' => ( $height[1] & 0xFFFFFF ) + 1 ); @@ -271,7 +271,7 @@ class WebPHandler extends BitmapHandler { $ser = $image->getMetadata(); if ( $ser ) { $metadata = unserialize( $ser ); - if ( isset($metadata['animated']) && $metadata['animated'] === true ) { + if ( isset( $metadata['animated'] ) && $metadata['animated'] === true ) { return true; } } diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index 64678f416f..c704c1a8ef 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -349,7 +349,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule { $pairs = array_map( function ( $value ) { $value = FormatJson::encode( $value, ResourceLoader::inDebugMode(), FormatJson::ALL_OK ); // Fix indentation - $value = str_replace( "\n", "\n\t", $value ); + $value = str_replace( "\n", "\n\t", $value ); return $value; }, array( '$VARS.wgLegacyJavaScriptGlobals' => $this->getConfig()->get( 'LegacyJavaScriptGlobals' ), diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index f50dd09388..af2dc94b32 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -488,7 +488,7 @@ class SpecialSearch extends SpecialPage { return Html::rawElement( 'div', array( 'class' => 'searchdidyoumean' ), - $this->msg( 'search-rewritten')->rawParams( $rewritten, $original )->escaped() + $this->msg( 'search-rewritten' )->rawParams( $rewritten, $original )->escaped() ); } diff --git a/includes/utils/BatchRowWriter.php b/includes/utils/BatchRowWriter.php index 9daeab14c1..04c00a3dce 100644 --- a/includes/utils/BatchRowWriter.php +++ b/includes/utils/BatchRowWriter.php @@ -49,7 +49,7 @@ class BatchRowWriter { /** * @param array $updates Array of arrays each containing two keys, 'primaryKey' - * and 'changes'. primaryKey must contain a map of column names to values + * and 'changes'. primaryKey must contain a map of column names to values * sufficient to uniquely identify the row changes must contain a map of column * names to update values to apply to the row. */ diff --git a/includes/widget/NamespaceInputWidget.php b/includes/widget/NamespaceInputWidget.php index 2d69ed7c31..f10ea709e9 100644 --- a/includes/widget/NamespaceInputWidget.php +++ b/includes/widget/NamespaceInputWidget.php @@ -103,7 +103,7 @@ class NamespaceInputWidget extends \OOUI\Widget { $namespaceOptions = \Html::namespaceSelectorOptions( $namespaceOptionsParams ); $options = array(); - foreach( $namespaceOptions as $id => $name ) { + foreach ( $namespaceOptions as $id => $name ) { $options[] = array( 'data' => (string)$id, 'label' => $name,