jenkins-bot has submitted this change and it was merged.

Change subject: Fixed spacing
......................................................................


Fixed spacing

- Removed spaces around array index
- Changed else if to elseif
- Added space after foreach/if/function
- include_once is not a function

Change-Id: I7745ae791d1b7e60cfebec6d268513a9cc071bdd
---
M includes/Cookie.php
M includes/Skin.php
M includes/media/SVG.php
M includes/resourceloader/ResourceLoader.php
M tests/phpunit/phpunit.php
5 files changed, 18 insertions(+), 17 deletions(-)

Approvals:
  Siebrand: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Cookie.php b/includes/Cookie.php
index 8b5906a..cb04190 100644
--- a/includes/Cookie.php
+++ b/includes/Cookie.php
@@ -94,8 +94,9 @@
 
                // Don't allow a trailing dot or addresses without a or just a 
leading dot
                if ( substr( $domain, -1 ) == '.' ||
-                        count( $dc ) <= 1 ||
-                        count( $dc ) == 2 && $dc[0] === '' ) {
+                       count( $dc ) <= 1 ||
+                       count( $dc ) == 2 && $dc[0] === ''
+               ) {
                        return false;
                }
 
diff --git a/includes/Skin.php b/includes/Skin.php
index fd737c0..a59d567 100644
--- a/includes/Skin.php
+++ b/includes/Skin.php
@@ -220,7 +220,7 @@
                                # is no longer valid.
                                wfDebug( "Skin class does not exist: 
$className\n" );
 
-                               $fallback = $skinNames[ Skin::normalizeKey( 
$wgFallbackSkin ) ];
+                               $fallback = $skinNames[Skin::normalizeKey( 
$wgFallbackSkin )];
                                $className = "Skin{$fallback}";
                        }
                }
diff --git a/includes/media/SVG.php b/includes/media/SVG.php
index 9245d42..a0ce806 100644
--- a/includes/media/SVG.php
+++ b/includes/media/SVG.php
@@ -202,7 +202,7 @@
                $tmpDir = wfTempDir() . '/svg_' . wfRandomString( 24 );
                $lnPath = "$tmpDir/" . basename( $srcPath );
                $ok = mkdir( $tmpDir, 0771 ) && symlink( $srcPath, $lnPath );
-               $cleaner = new ScopedCallback( function() use ( $tmpDir, 
$lnPath ) {
+               $cleaner = new ScopedCallback( function () use ( $tmpDir, 
$lnPath ) {
                        wfSuppressWarnings();
                        unlink( $lnPath );
                        rmdir( $tmpDir );
diff --git a/includes/resourceloader/ResourceLoader.php 
b/includes/resourceloader/ResourceLoader.php
index bcb3842..d46f0a3 100644
--- a/includes/resourceloader/ResourceLoader.php
+++ b/includes/resourceloader/ResourceLoader.php
@@ -307,11 +307,11 @@
 
                                        // If $name is preceded with a '+', the 
defined style files will be added to 'default'
                                        // skinStyles, otherwise 'default' will 
be ignored as it normally would be.
-                                       if ( isset( $skinStyles[ $name ] ) ) {
-                                               $paths = (array)$skinStyles[ 
$name ];
+                                       if ( isset( $skinStyles[$name] ) ) {
+                                               $paths = 
(array)$skinStyles[$name];
                                                $styleFiles = array();
-                                       } else if ( isset( $skinStyles[ '+' . 
$name ] ) ) {
-                                               $paths = (array)$skinStyles[ 
'+' . $name ];
+                                       } elseif ( isset( $skinStyles['+' . 
$name] ) ) {
+                                               $paths = (array)$skinStyles['+' 
. $name];
                                                $styleFiles = isset( 
$this->moduleInfos[$name]['skinStyles']['default'] ) ?
                                                        
$this->moduleInfos[$name]['skinStyles']['default'] :
                                                        array();
diff --git a/tests/phpunit/phpunit.php b/tests/phpunit/phpunit.php
index 63313cf..1125504 100755
--- a/tests/phpunit/phpunit.php
+++ b/tests/phpunit/phpunit.php
@@ -148,17 +148,17 @@
                }
 
                $key = array_search( '--debug-tests', $_SERVER['argv'] );
-               if( $key !== false && array_search( '--printer', 
$_SERVER['argv'] ) === false ) {
+               if ( $key !== false && array_search( '--printer', 
$_SERVER['argv'] ) === false ) {
                        unset( $_SERVER['argv'][$key] );
                        array_splice( $_SERVER['argv'], 1, 0, 
'MediaWikiPHPUnitTestListener' );
                        array_splice( $_SERVER['argv'], 1, 0, '--printer' );
                }
 
-               foreach( self::$additionalOptions as $option => $default ) {
+               foreach ( self::$additionalOptions as $option => $default ) {
                        $key = array_search( '--' . $option, $_SERVER['argv'] );
-                       if( $key !== false ) {
+                       if ( $key !== false ) {
                                unset( $_SERVER['argv'][$key] );
-                               if( $this->mParams[$option]['withArg'] ) {
+                               if ( $this->mParams[$option]['withArg'] ) {
                                        self::$additionalOptions[$option] = 
$_SERVER['argv'][$key + 1];
                                        unset( $_SERVER['argv'][$key + 1] );
                                } else {
@@ -179,11 +179,11 @@
         */
        private function forceFormatServerArgv() {
                $argv = array();
-               foreach( $_SERVER['argv'] as $key => $arg ) {
-                       if( $key === 0 ) {
+               foreach ( $_SERVER['argv'] as $key => $arg ) {
+                       if ( $key === 0 ) {
                                $argv[0] = $arg;
                        } elseif ( strstr( $arg, '=' ) ) {
-                               foreach( explode( '=', $arg, 2 ) as $argPart ) {
+                               foreach ( explode( '=', $arg, 2 ) as $argPart ) 
{
                                        $argv[] = $argPart;
                                }
                        } else {
@@ -209,12 +209,12 @@
 
 $ok = false;
 
-foreach( array(
+foreach ( array(
        stream_resolve_include_path( 'phpunit.phar' ),
        'PHPUnit/Runner/Version.php',
        'PHPUnit/Autoload.php'
 ) as $includePath ) {
-       @include_once( $includePath );
+       @include_once $includePath;
        if ( class_exists( 'PHPUnit_TextUI_Command' ) ) {
                $ok = true;
                break;

-- 
To view, visit https://gerrit.wikimedia.org/r/151600
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7745ae791d1b7e60cfebec6d268513a9cc071bdd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Daniel Friesen <dan...@nadir-seen-fire.com>
Gerrit-Reviewer: Jack Phoenix <j...@countervandalism.net>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to