[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Update coding rules according to phpcs
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/372757 ) Change subject: Update coding rules according to phpcs .. Update coding rules according to phpcs Change-Id: I42a24b5000f50558f219622b08c5e49de754ca58 --- M src/AbstractMediaWikiFarmScript.php M src/MediaWikiFarm.php M src/MediaWikiFarmConfiguration.php M tests/perfs/MediaWikiFarmTestPerfs.php M tests/perfs/perfs.php M tests/phpunit/MediaWikiFarmTestCase.php M tests/phpunit/MultiversionInstallationTest.php 7 files changed, 14 insertions(+), 12 deletions(-) Approvals: Seb35: Looks good to me, approved jenkins-bot: Verified diff --git a/src/AbstractMediaWikiFarmScript.php b/src/AbstractMediaWikiFarmScript.php index caa0659..99f6283 100644 --- a/src/AbstractMediaWikiFarmScript.php +++ b/src/AbstractMediaWikiFarmScript.php @@ -90,7 +90,7 @@ break; } elseif( $this->argv[$posArg] == '--'.$name && $posArg < $this->argc - 1 ) { - $value = $this->argv[$posArg+1]; + $value = $this->argv[$posArg + 1]; $nbArgs = 2; break; } @@ -111,7 +111,7 @@ if( $shift ) { $this->argc -= $nbArgs; - $this->argv = array_merge( array_slice( $this->argv, 0, $posArg ), array_slice( $this->argv, $posArg+$nbArgs ) ); + $this->argv = array_merge( array_slice( $this->argv, 0, $posArg ), array_slice( $this->argv, $posArg + $nbArgs ) ); } return $value; diff --git a/src/MediaWikiFarm.php b/src/MediaWikiFarm.php index 7603cc9..147e1b7 100644 --- a/src/MediaWikiFarm.php +++ b/src/MediaWikiFarm.php @@ -806,7 +806,7 @@ * * @param string $host Requested host. * @param array $farms All farm configurations. -* @param integer $redirects Number of remaining internal redirects before error. +* @param int $redirects Number of remaining internal redirects before error. * @return array */ function selectFarm( $host, $farms, $redirects ) { diff --git a/src/MediaWikiFarmConfiguration.php b/src/MediaWikiFarmConfiguration.php index 97cea26..5033c07 100644 --- a/src/MediaWikiFarmConfiguration.php +++ b/src/MediaWikiFarmConfiguration.php @@ -253,7 +253,7 @@ $settingsArray[$setting] = array(); $prioritiesArray[$setting] = 0; } - $thisSetting = &$settingsArray[$setting]; + $thisSetting = &$settingsArray[$setting]; $thisPriority = &$prioritiesArray[$setting]; } else { $settingIsArray = false; @@ -261,7 +261,7 @@ $settings[$setting] = null; $priorities[$setting] = 0; } - $thisSetting = &$settings[$setting]; + $thisSetting = &$settings[$setting]; $thisPriority = &$priorities[$setting]; if( substr( $setting, 0, 14 ) == 'wgUseExtension' ) { $extensions['Extension' . substr( $rawSetting, 14 )] = array( substr( $rawSetting, 14 ), 'extension', null, count( $extensions ) ); @@ -489,7 +489,7 @@ * * @param string $type Type, in ['extension', 'skin']. * @param string $name Name of the extension/skin. -* @return boolean The extension/skin is Composer-managed (at least for its installation). +* @return bool The extension/skin is Composer-managed (at least for its installation). */ function detectComposer( $type, $name ) { @@ -609,7 +609,7 @@ * @internal * * @param array $configuration Array with the schema defined for $this->configuration. -* @param boolean $isMonoversion Is MediaWikiFarm configured for monoversion? +* @param bool $isMonoversion Is MediaWikiFarm configured for monoversion? * @param string $preconfig PHP code to be added at the top of the file. * @param string $postconfig PHP code to be added at the end of the file. * @return string Content of the file LocalSettings.php. diff
[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Update coding rules according to phpcs
Seb35 has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/372757 ) Change subject: Update coding rules according to phpcs .. Update coding rules according to phpcs Change-Id: I42a24b5000f50558f219622b08c5e49de754ca58 --- M src/AbstractMediaWikiFarmScript.php M src/MediaWikiFarm.php M src/MediaWikiFarmConfiguration.php M tests/perfs/MediaWikiFarmTestPerfs.php M tests/perfs/perfs.php M tests/phpunit/MultiversionInstallationTest.php 6 files changed, 13 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MediaWikiFarm refs/changes/57/372757/1 diff --git a/src/AbstractMediaWikiFarmScript.php b/src/AbstractMediaWikiFarmScript.php index caa0659..99f6283 100644 --- a/src/AbstractMediaWikiFarmScript.php +++ b/src/AbstractMediaWikiFarmScript.php @@ -90,7 +90,7 @@ break; } elseif( $this->argv[$posArg] == '--'.$name && $posArg < $this->argc - 1 ) { - $value = $this->argv[$posArg+1]; + $value = $this->argv[$posArg + 1]; $nbArgs = 2; break; } @@ -111,7 +111,7 @@ if( $shift ) { $this->argc -= $nbArgs; - $this->argv = array_merge( array_slice( $this->argv, 0, $posArg ), array_slice( $this->argv, $posArg+$nbArgs ) ); + $this->argv = array_merge( array_slice( $this->argv, 0, $posArg ), array_slice( $this->argv, $posArg + $nbArgs ) ); } return $value; diff --git a/src/MediaWikiFarm.php b/src/MediaWikiFarm.php index 7603cc9..147e1b7 100644 --- a/src/MediaWikiFarm.php +++ b/src/MediaWikiFarm.php @@ -806,7 +806,7 @@ * * @param string $host Requested host. * @param array $farms All farm configurations. -* @param integer $redirects Number of remaining internal redirects before error. +* @param int $redirects Number of remaining internal redirects before error. * @return array */ function selectFarm( $host, $farms, $redirects ) { diff --git a/src/MediaWikiFarmConfiguration.php b/src/MediaWikiFarmConfiguration.php index 97cea26..5033c07 100644 --- a/src/MediaWikiFarmConfiguration.php +++ b/src/MediaWikiFarmConfiguration.php @@ -253,7 +253,7 @@ $settingsArray[$setting] = array(); $prioritiesArray[$setting] = 0; } - $thisSetting = &$settingsArray[$setting]; + $thisSetting = &$settingsArray[$setting]; $thisPriority = &$prioritiesArray[$setting]; } else { $settingIsArray = false; @@ -261,7 +261,7 @@ $settings[$setting] = null; $priorities[$setting] = 0; } - $thisSetting = &$settings[$setting]; + $thisSetting = &$settings[$setting]; $thisPriority = &$priorities[$setting]; if( substr( $setting, 0, 14 ) == 'wgUseExtension' ) { $extensions['Extension' . substr( $rawSetting, 14 )] = array( substr( $rawSetting, 14 ), 'extension', null, count( $extensions ) ); @@ -489,7 +489,7 @@ * * @param string $type Type, in ['extension', 'skin']. * @param string $name Name of the extension/skin. -* @return boolean The extension/skin is Composer-managed (at least for its installation). +* @return bool The extension/skin is Composer-managed (at least for its installation). */ function detectComposer( $type, $name ) { @@ -609,7 +609,7 @@ * @internal * * @param array $configuration Array with the schema defined for $this->configuration. -* @param boolean $isMonoversion Is MediaWikiFarm configured for monoversion? +* @param bool $isMonoversion Is MediaWikiFarm configured for monoversion? * @param string $preconfig PHP code to be added at the top of the file. * @param string $postconfig PHP code to be added at the end of the file. * @return string Content of the file LocalSettings.php. diff --git