Update code formatting
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Mon, 25 Mar 2013 23:27:14 +0000 (00:27 +0100)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Wed, 27 Mar 2013 13:15:11 +0000 (14:15 +0100)
Also update some previous inconsistencies pointed out by Krinkle in change IDs:
* Ide20743a2e84ff68549286120e6cff9d9f396f54
* I811ca957b6588085d67606ebc0cd4033a1e53839

Change-Id: Ife33b931870d0d7e04fcb40974997436d27f528f

48 files changed:
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/includes/LanguageConverterTest.php
tests/phpunit/includes/PathRouterTest.php
tests/phpunit/includes/StringUtilsTest.php
tests/phpunit/includes/api/ApiAccountCreationTest.php
tests/phpunit/includes/api/ApiTest.php
tests/phpunit/includes/api/query/ApiQueryBasicTest.php
tests/phpunit/includes/api/query/ApiQueryContinue2Test.php
tests/phpunit/includes/api/query/ApiQueryContinueTest.php
tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php
tests/phpunit/includes/api/query/ApiQueryTestBase.php
tests/phpunit/includes/cache/MessageCacheTest.php
tests/phpunit/includes/content/ContentHandlerTest.php
tests/phpunit/includes/filebackend/FileBackendTest.php
tests/phpunit/includes/jobqueue/JobQueueTest.php
tests/phpunit/languages/LanguageBe_taraskTest.php
tests/phpunit/languages/LanguageCsTest.php
tests/phpunit/languages/LanguageCuTest.php
tests/phpunit/languages/LanguageCyTest.php
tests/phpunit/languages/LanguageGaTest.php
tests/phpunit/languages/LanguageGdTest.php
tests/phpunit/languages/LanguageGvTest.php
tests/phpunit/languages/LanguageHeTest.php
tests/phpunit/languages/LanguageHrTest.php
tests/phpunit/languages/LanguageHyTest.php
tests/phpunit/languages/LanguageKshTest.php
tests/phpunit/languages/LanguageLtTest.php
tests/phpunit/languages/LanguageLvTest.php
tests/phpunit/languages/LanguageMkTest.php
tests/phpunit/languages/LanguageMoTest.php
tests/phpunit/languages/LanguageMtTest.php
tests/phpunit/languages/LanguageNsoTest.php
tests/phpunit/languages/LanguagePlTest.php
tests/phpunit/languages/LanguageRoTest.php
tests/phpunit/languages/LanguageRuTest.php
tests/phpunit/languages/LanguageSeTest.php
tests/phpunit/languages/LanguageShTest.php
tests/phpunit/languages/LanguageSkTest.php
tests/phpunit/languages/LanguageSlTest.php
tests/phpunit/languages/LanguageSmaTest.php
tests/phpunit/languages/LanguageSrTest.php
tests/phpunit/languages/LanguageTiTest.php
tests/phpunit/languages/LanguageTlTest.php
tests/phpunit/languages/LanguageUkTest.php
tests/phpunit/languages/LanguageWaTest.php
tests/phpunit/phpunit.php
tests/phpunit/suites/UploadFromUrlTestSuite.php
tests/qunit/data/testrunner.js

index 7d95b07..ecc8ad1 100644 (file)
@@ -438,7 +438,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
         * even if using different parameters.
         *
         * @param DatabaseBase $db The database connection
-        * @param String  $prefix The prefix to use for the new table set (aka schema).
+        * @param String $prefix The prefix to use for the new table set (aka schema).
         *
         * @throws MWException if the database table prefix is already $prefix
         */
index d4d93b0..ab93b2b 100644 (file)
@@ -85,7 +85,7 @@ class LanguageConverterTest extends MediaWikiLangTestCase {
                $wgUser->mFrom = 'defaults';
                $wgUser->mOptionsLoaded = true;
                // The user's data is ignored because the variant is set in the URL.
-               $wgUser->setOption( 'variant', 'tg-latn' ); 
+               $wgUser->setOption( 'variant', 'tg-latn' );
                $this->assertEquals( 'tg', $this->lc->getPreferredVariant() );
        }
 
index 2259187..9e50b4c 100644 (file)
@@ -151,18 +151,20 @@ class PathRouterTest extends MediaWikiTestCase {
                $router->add( array( 'qwerty' => "/qwerty/$1" ), array( 'qwerty' => '$key' ) );
                $router->add( "/$2/$1", array( 'restricted-to-y' => '$2' ), array( '$2' => 'y' ) );
 
-               foreach ( array(
-                                       '/Foo' => array( 'title' => 'Foo' ),
-                                       '/Bar' => array( 'ping' => 'pong' ),
-                                       '/Baz' => array( 'marco' => 'polo' ),
-                                       '/asdf-foo' => array( 'title' => 'qwerty-foo' ),
-                                       '/qwerty-bar' => array( 'title' => 'asdf-bar' ),
-                                       '/a/Foo' => array( 'title' => 'Foo' ),
-                                       '/asdf/Foo' => array( 'title' => 'Foo' ),
-                                       '/qwerty/Foo' => array( 'title' => 'Foo', 'qwerty' => 'qwerty' ),
-                                       '/baz/Foo' => array( 'title' => 'Foo', 'unrestricted' => 'baz' ),
-                                       '/y/Foo' => array( 'title' => 'Foo', 'restricted-to-y' => 'y' ),
-                               ) as $path => $result ) {
+               foreach (
+                       array(
+                               '/Foo' => array( 'title' => 'Foo' ),
+                               '/Bar' => array( 'ping' => 'pong' ),
+                               '/Baz' => array( 'marco' => 'polo' ),
+                               '/asdf-foo' => array( 'title' => 'qwerty-foo' ),
+                               '/qwerty-bar' => array( 'title' => 'asdf-bar' ),
+                               '/a/Foo' => array( 'title' => 'Foo' ),
+                               '/asdf/Foo' => array( 'title' => 'Foo' ),
+                               '/qwerty/Foo' => array( 'title' => 'Foo', 'qwerty' => 'qwerty' ),
+                               '/baz/Foo' => array( 'title' => 'Foo', 'unrestricted' => 'baz' ),
+                               '/y/Foo' => array( 'title' => 'Foo', 'restricted-to-y' => 'y' ),
+                       ) as $path => $result
+               ) {
                        $this->assertEquals( $router->parse( $path ), $result );
                }
        }
index a54a57e..0530b44 100644 (file)
@@ -29,7 +29,7 @@ class StringUtilsTest extends MediaWikiTestCase {
         */
        function testIsUtf8WithPhpFallbackImplementation( $expected, $string ) {
                $this->assertEquals( $expected,
-                       StringUtils::isUtf8( $string, /** disable mbstring: */ true ),
+                       StringUtils::isUtf8( $string, /** disable mbstring: */true ),
                        'Testing string "' . $this->escaped( $string ) . '" with pure PHP implementation'
                );
        }
@@ -116,7 +116,7 @@ class StringUtilsTest extends MediaWikiTestCase {
                        array( $FAIL, "\xff" ),
                        array( $FAIL, "\xfe\xfe\xff\xff" ),
 
-                       /**
+                       /*
                        # The PHP implementation does not handle characters
                        # being represented in a form which is too long :(
 
@@ -133,7 +133,7 @@ class StringUtilsTest extends MediaWikiTestCase {
                        array( $FAIL, "\xf0\x8F\xbf\xbf" ),
                        array( $FAIL, "\xf8\x87\xbf\xbf" ),
                        array( $FAIL, "\xfc\x83\xbf\xbf\xbf\xbf" ),
-                       **/
+                       */
 
                        # non characters
                        array( $PASS, "\xef\xbf\xbe" ),
index 94082e5..696b145 100644 (file)
@@ -65,8 +65,7 @@ class ApiCreateAccountTest extends ApiTestCase {
                        'action' => 'login',
                        'lgname' => 'Apitestnew',
                        'lgpassword' => $password,
-                       )
-               );
+               ) );
 
                $result = $ret[0];
                $this->assertNotInternalType( 'bool', $result );
@@ -76,12 +75,14 @@ class ApiCreateAccountTest extends ApiTestCase {
                $this->assertEquals( 'NeedToken', $a );
                $token = $result['login']['token'];
 
-               $ret = $this->doApiRequest( array(
-                       'action' => 'login',
-                       'lgtoken' => $token,
-                       'lgname' => 'Apitestnew',
-                       'lgpassword' => $password,
-                       ), $ret[2]
+               $ret = $this->doApiRequest(
+                       array(
+                               'action' => 'login',
+                               'lgtoken' => $token,
+                               'lgname' => 'Apitestnew',
+                               'lgpassword' => $password,
+                       ),
+                       $ret[2]
                );
 
                $result = $ret[0];
@@ -92,9 +93,11 @@ class ApiCreateAccountTest extends ApiTestCase {
                $this->assertEquals( 'Success', $a );
 
                // log out to destroy the session
-               $ret = $this->doApiRequest( array(
-                       'action' => 'logout',
-                       ), $ret[2]
+               $ret = $this->doApiRequest(
+                       array(
+                               'action' => 'logout',
+                       ),
+                       $ret[2]
                );
                $this->assertEquals( array(), $ret[0] );
        }
index 2277028..e278fd0 100644 (file)
@@ -81,8 +81,7 @@ class ApiTest extends ApiTestCase {
                        "action" => "login",
                        "lgname" => $user->username,
                        "lgpassword" => "bad",
-                       )
-               );
+               ) );
 
                $result = $ret[0];
 
@@ -136,7 +135,7 @@ class ApiTest extends ApiTestCase {
                $token = $result["login"]["token"];
 
                $ret = $this->doApiRequest(
-                       array(
+                       array(
                                "action" => "login",
                                "lgtoken" => $token,
                                "lgname" => $user->username,
index 6d4e371..30ec6c3 100644 (file)
@@ -67,7 +67,10 @@ class ApiQueryBasicTest extends ApiQueryTestBase {
                                'title' => 'AQBT-All',
                                'links' => array(
                                        array( 'ns' => 0, 'title' => 'AQBT-Links' ),
-       ) ) ) ) );
+                               )
+                       )
+               ) )
+       );
 
        private static $templates = array(
                array( 'prop' => 'templates', 'titles' => 'AQBT-All' ),
@@ -78,7 +81,10 @@ class ApiQueryBasicTest extends ApiQueryTestBase {
                                'title' => 'AQBT-All',
                                'templates' => array(
                                        array( 'ns' => 10, 'title' => 'Template:AQBT-T' ),
-       ) ) ) ) );
+                               )
+                       )
+               ) )
+       );
 
        private static $categories = array(
                array( 'prop' => 'categories', 'titles' => 'AQBT-All' ),
@@ -89,7 +95,10 @@ class ApiQueryBasicTest extends ApiQueryTestBase {
                                'title' => 'AQBT-All',
                                'categories' => array(
                                        array( 'ns' => 14, 'title' => 'Category:AQBT-Cat' ),
-       ) ) ) ) );
+                               )
+                       )
+               ) )
+       );
 
        private static $allpages = array(
                array( 'list' => 'allpages', 'apprefix' => 'AQBT-' ),
@@ -98,7 +107,8 @@ class ApiQueryBasicTest extends ApiQueryTestBase {
                        array( 'pageid' => 2, 'ns' => 0, 'title' => 'AQBT-Categories' ),
                        array( 'pageid' => 3, 'ns' => 0, 'title' => 'AQBT-Links' ),
                        array( 'pageid' => 4, 'ns' => 0, 'title' => 'AQBT-Templates' ),
-       ) ) );
+               ) )
+       );
 
        private static $alllinks = array(
                array( 'list' => 'alllinks', 'alprefix' => 'AQBT-' ),
@@ -107,40 +117,46 @@ class ApiQueryBasicTest extends ApiQueryTestBase {
                        array( 'ns' => 0, 'title' => 'AQBT-Categories' ),
                        array( 'ns' => 0, 'title' => 'AQBT-Links' ),
                        array( 'ns' => 0, 'title' => 'AQBT-Templates' ),
-       ) ) );
+               ) )
+       );
 
        private static $alltransclusions = array(
                array( 'list' => 'alltransclusions', 'atprefix' => 'AQBT-' ),
                array( 'alltransclusions' => array(
                        array( 'ns' => 10, 'title' => 'Template:AQBT-T' ),
                        array( 'ns' => 10, 'title' => 'Template:AQBT-T' ),
-       ) ) );
+               ) )
+       );
 
        private static $allcategories = array(
                array( 'list' => 'allcategories', 'acprefix' => 'AQBT-' ),
                array( 'allcategories' => array(
                        array( '*' => 'AQBT-Cat' ),
-       ) ) );
+               ) )
+       );
 
        private static $backlinks = array(
                array( 'list' => 'backlinks', 'bltitle' => 'AQBT-Links' ),
                array( 'backlinks' => array(
                        array( 'pageid' => 1, 'ns' => 0, 'title' => 'AQBT-All' ),
-       ) ) );
+               ) )
+       );
 
        private static $embeddedin = array(
                array( 'list' => 'embeddedin', 'eititle' => 'Template:AQBT-T' ),
                array( 'embeddedin' => array(
                        array( 'pageid' => 1, 'ns' => 0, 'title' => 'AQBT-All' ),
                        array( 'pageid' => 4, 'ns' => 0, 'title' => 'AQBT-Templates' ),
-       ) ) );
+               ) )
+       );
 
        private static $categorymembers = array(
                array( 'list' => 'categorymembers', 'cmtitle' => 'Category:AQBT-Cat' ),
                array( 'categorymembers' => array(
                        array( 'pageid' => 1, 'ns' => 0, 'title' => 'AQBT-All' ),
                        array( 'pageid' => 2, 'ns' => 0, 'title' => 'AQBT-Categories' ),
-       ) ) );
+               ) )
+       );
 
        private static $generatorAllpages = array(
                array( 'generator' => 'allpages', 'gapprefix' => 'AQBT-' ),
@@ -161,7 +177,8 @@ class ApiQueryBasicTest extends ApiQueryTestBase {
                                'pageid' => 4,
                                'ns' => 0,
                                'title' => 'AQBT-Templates' ),
-       ) ) );
+               ) )
+       );
 
        private static $generatorLinks = array(
                array( 'generator' => 'links', 'titles' => 'AQBT-Links' ),
@@ -178,14 +195,17 @@ class ApiQueryBasicTest extends ApiQueryTestBase {
                                'pageid' => 4,
                                'ns' => 0,
                                'title' => 'AQBT-Templates' ),
-       ) ) );
+               ) )
+       );
 
        private static $generatorLinksPropLinks = array(
                array( 'prop' => 'links' ),
                array( 'pages' => array(
                        '1' => array( 'links' => array(
                                array( 'ns' => 0, 'title' => 'AQBT-Links' ),
-       ) ) ) ) );
+                       ) )
+               ) )
+       );
 
        private static $generatorLinksPropTemplates = array(
                array( 'prop' => 'templates' ),
@@ -194,7 +214,8 @@ class ApiQueryBasicTest extends ApiQueryTestBase {
                                array( 'ns' => 10, 'title' => 'Template:AQBT-T' ) ) ),
                        '4' => array( 'templates' => array(
                                array( 'ns' => 10, 'title' => 'Template:AQBT-T' ) ) ),
-               ) ) );
+               ) )
+       );
 
        /**
         * Test basic props
index 0a3ac1d..c68065d 100644 (file)
@@ -48,7 +48,7 @@ class ApiQueryContinue2Test extends ApiQueryContinueTestBase {
         */
        public function testA() {
                $this->mVerbose = false;
-               $mk = function( $g, $p, $gDir ) {
+               $mk = function ( $g, $p, $gDir ) {
                        return array(
                                'generator' => 'allpages',
                                'gapprefix' => 'AQCT73462-',
@@ -59,10 +59,10 @@ class ApiQueryContinue2Test extends ApiQueryContinueTestBase {
                        );
                };
                // generator + 1 prop + 1 list
-               $data = $this->query( $mk(99,99,true), 1, 'g1p', false );
-               $this->checkC( $data, $mk(1,1,true), 6, 'g1p-11t' );
-               $this->checkC( $data, $mk(2,2,true), 3, 'g1p-22t' );
-               $this->checkC( $data, $mk(1,1,false), 6, 'g1p-11f' );
-               $this->checkC( $data, $mk(2,2,false), 3, 'g1p-22f' );
+               $data = $this->query( $mk( 99, 99, true ), 1, 'g1p', false );
+               $this->checkC( $data, $mk( 1, 1, true ), 6, 'g1p-11t' );
+               $this->checkC( $data, $mk( 2, 2, true ), 3, 'g1p-22t' );
+               $this->checkC( $data, $mk( 1, 1, false ), 6, 'g1p-11f' );
+               $this->checkC( $data, $mk( 2, 2, false ), 3, 'g1p-22f' );
        }
 }
index cb8f181..33f4663 100644 (file)
@@ -58,21 +58,21 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
         */
        public function test1List() {
                $this->mVerbose = false;
-               $mk = function( $l ) {
+               $mk = function ( $l ) {
                        return array(
                                'list' => 'allpages',
                                'apprefix' => 'AQCT-',
                                'aplimit' => "$l",
                        );
                };
-               $data = $this->query( $mk(99), 1, '1L', false );
+               $data = $this->query( $mk( 99 ), 1, '1L', false );
 
                // 1 list
-               $this->checkC( $data, $mk(1), 5, '1L-1' );
-               $this->checkC( $data, $mk(2), 3, '1L-2' );
-               $this->checkC( $data, $mk(3), 2, '1L-3' );
-               $this->checkC( $data, $mk(4), 2, '1L-4' );
-               $this->checkC( $data, $mk(5), 1, '1L-5' );
+               $this->checkC( $data, $mk( 1 ), 5, '1L-1' );
+               $this->checkC( $data, $mk( 2 ), 3, '1L-2' );
+               $this->checkC( $data, $mk( 3 ), 2, '1L-3' );
+               $this->checkC( $data, $mk( 4 ), 2, '1L-4' );
+               $this->checkC( $data, $mk( 5 ), 1, '1L-5' );
        }
 
        /**
@@ -81,7 +81,7 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
         */
        public function test2Lists() {
                $this->mVerbose = false;
-               $mk = function( $l1, $l2 ) {
+               $mk = function ( $l1, $l2 ) {
                        return array(
                                'list' => 'allpages|alltransclusions',
                                'apprefix' => 'AQCT-',
@@ -92,12 +92,12 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
                        );
                };
                // 2 lists
-               $data = $this->query( $mk(99,99), 1, '2L', false );
-               $this->checkC( $data, $mk(1,1), 5, '2L-11' );
-               $this->checkC( $data, $mk(2,2), 3, '2L-22' );
-               $this->checkC( $data, $mk(3,3), 2, '2L-33' );
-               $this->checkC( $data, $mk(4,4), 2, '2L-44' );
-               $this->checkC( $data, $mk(5,5), 1, '2L-55' );
+               $data = $this->query( $mk( 99, 99 ), 1, '2L', false );
+               $this->checkC( $data, $mk( 1, 1 ), 5, '2L-11' );
+               $this->checkC( $data, $mk( 2, 2 ), 3, '2L-22' );
+               $this->checkC( $data, $mk( 3, 3 ), 2, '2L-33' );
+               $this->checkC( $data, $mk( 4, 4 ), 2, '2L-44' );
+               $this->checkC( $data, $mk( 5, 5 ), 1, '2L-55' );
        }
 
        /**
@@ -106,7 +106,7 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
         */
        public function testGen1Prop() {
                $this->mVerbose = false;
-               $mk = function( $g, $p ) {
+               $mk = function ( $g, $p ) {
                        return array(
                                'generator' => 'allpages',
                                'gapprefix' => 'AQCT-',
@@ -116,12 +116,12 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
                        );
                };
                // generator + 1 prop
-               $data = $this->query( $mk(99,99), 1, 'G1P', false );
-               $this->checkC( $data, $mk(1,1), 11, 'G1P-11' );
-               $this->checkC( $data, $mk(2,2), 6, 'G1P-22' );
-               $this->checkC( $data, $mk(3,3), 4, 'G1P-33' );
-               $this->checkC( $data, $mk(4,4), 3, 'G1P-44' );
-               $this->checkC( $data, $mk(5,5), 2, 'G1P-55' );
+               $data = $this->query( $mk( 99, 99 ), 1, 'G1P', false );
+               $this->checkC( $data, $mk( 1, 1 ), 11, 'G1P-11' );
+               $this->checkC( $data, $mk( 2, 2 ), 6, 'G1P-22' );
+               $this->checkC( $data, $mk( 3, 3 ), 4, 'G1P-33' );
+               $this->checkC( $data, $mk( 4, 4 ), 3, 'G1P-44' );
+               $this->checkC( $data, $mk( 5, 5 ), 2, 'G1P-55' );
        }
 
        /**
@@ -130,7 +130,7 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
         */
        public function testGen2Prop() {
                $this->mVerbose = false;
-               $mk = function( $g, $p1, $p2 ) {
+               $mk = function ( $g, $p1, $p2 ) {
                        return array(
                                'generator' => 'allpages',
                                'gapprefix' => 'AQCT-',
@@ -141,17 +141,17 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
                        );
                };
                // generator + 2 props
-               $data = $this->query( $mk(99,99,99), 1, 'G2P', false );
-               $this->checkC( $data, $mk(1,1,1), 16, 'G2P-111' );
-               $this->checkC( $data, $mk(2,2,2), 9, 'G2P-222' );
-               $this->checkC( $data, $mk(3,3,3), 6, 'G2P-333' );
-               $this->checkC( $data, $mk(4,4,4), 4, 'G2P-444' );
-               $this->checkC( $data, $mk(5,5,5), 2, 'G2P-555' );
-               $this->checkC( $data, $mk(5,1,1), 10, 'G2P-511' );
-               $this->checkC( $data, $mk(4,2,2), 7, 'G2P-422' );
-               $this->checkC( $data, $mk(2,3,3), 7, 'G2P-233' );
-               $this->checkC( $data, $mk(2,4,4), 5, 'G2P-244' );
-               $this->checkC( $data, $mk(1,5,5), 5, 'G2P-155' );
+               $data = $this->query( $mk( 99, 99, 99 ), 1, 'G2P', false );
+               $this->checkC( $data, $mk( 1, 1, 1 ), 16, 'G2P-111' );
+               $this->checkC( $data, $mk( 2, 2, 2 ), 9, 'G2P-222' );
+               $this->checkC( $data, $mk( 3, 3, 3 ), 6, 'G2P-333' );
+               $this->checkC( $data, $mk( 4, 4, 4 ), 4, 'G2P-444' );
+               $this->checkC( $data, $mk( 5, 5, 5 ), 2, 'G2P-555' );
+               $this->checkC( $data, $mk( 5, 1, 1 ), 10, 'G2P-511' );
+               $this->checkC( $data, $mk( 4, 2, 2 ), 7, 'G2P-422' );
+               $this->checkC( $data, $mk( 2, 3, 3 ), 7, 'G2P-233' );
+               $this->checkC( $data, $mk( 2, 4, 4 ), 5, 'G2P-244' );
+               $this->checkC( $data, $mk( 1, 5, 5 ), 5, 'G2P-155' );
        }
 
        /**
@@ -160,7 +160,7 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
         */
        public function testGen1Prop1List() {
                $this->mVerbose = false;
-               $mk = function( $g, $p, $l ) {
+               $mk = function ( $g, $p, $l ) {
                        return array(
                                'generator' => 'allpages',
                                'gapprefix' => 'AQCT-',
@@ -174,24 +174,24 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
                        );
                };
                // generator + 1 prop + 1 list
-               $data = $this->query( $mk(99,99,99), 1, 'G1P1L', false );
-               $this->checkC( $data, $mk(1,1,1), 11, 'G1P1L-111' );
-               $this->checkC( $data, $mk(2,2,2), 6, 'G1P1L-222' );
-               $this->checkC( $data, $mk(3,3,3), 4, 'G1P1L-333' );
-               $this->checkC( $data, $mk(4,4,4), 3, 'G1P1L-444' );
-               $this->checkC( $data, $mk(5,5,5), 2, 'G1P1L-555' );
-               $this->checkC( $data, $mk(5,5,1), 4, 'G1P1L-551' );
-               $this->checkC( $data, $mk(5,5,2), 2, 'G1P1L-552' );
+               $data = $this->query( $mk( 99, 99, 99 ), 1, 'G1P1L', false );
+               $this->checkC( $data, $mk( 1, 1, 1 ), 11, 'G1P1L-111' );
+               $this->checkC( $data, $mk( 2, 2, 2 ), 6, 'G1P1L-222' );
+               $this->checkC( $data, $mk( 3, 3, 3 ), 4, 'G1P1L-333' );
+               $this->checkC( $data, $mk( 4, 4, 4 ), 3, 'G1P1L-444' );
+               $this->checkC( $data, $mk( 5, 5, 5 ), 2, 'G1P1L-555' );
+               $this->checkC( $data, $mk( 5, 5, 1 ), 4, 'G1P1L-551' );
+               $this->checkC( $data, $mk( 5, 5, 2 ), 2, 'G1P1L-552' );
        }
 
        /**
         * Test smart continue - generator=allpages, prop=links|templates,
-        *                                         list=alllinks|alltransclusions, meta=siteinfo
+        *                       list=alllinks|alltransclusions, meta=siteinfo
         * @medium
         */
        public function testGen2Prop2List1Meta() {
                $this->mVerbose = false;
-               $mk = function( $g, $p1, $p2, $l1, $l2 ) {
+               $mk = function ( $g, $p1, $p2, $l1, $l2 ) {
                        return array(
                                'generator' => 'allpages',
                                'gapprefix' => 'AQCT-',
@@ -211,16 +211,16 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
                        );
                };
                // generator + 1 prop + 1 list
-               $data = $this->query( $mk(99,99,99,99,99), 1, 'G2P2L1M', false );
-               $this->checkC( $data, $mk(1,1,1,1,1), 16, 'G2P2L1M-11111' );
-               $this->checkC( $data, $mk(2,2,2,2,2), 9, 'G2P2L1M-22222' );
-               $this->checkC( $data, $mk(3,3,3,3,3), 6, 'G2P2L1M-33333' );
-               $this->checkC( $data, $mk(4,4,4,4,4), 4, 'G2P2L1M-44444' );
-               $this->checkC( $data, $mk(5,5,5,5,5), 2, 'G2P2L1M-55555' );
-               $this->checkC( $data, $mk(5,5,5,1,1), 4, 'G2P2L1M-55511' );
-               $this->checkC( $data, $mk(5,5,5,2,2), 2, 'G2P2L1M-55522' );
-               $this->checkC( $data, $mk(5,1,1,5,5), 10, 'G2P2L1M-51155' );
-               $this->checkC( $data, $mk(5,2,2,5,5), 5, 'G2P2L1M-52255' );
+               $data = $this->query( $mk( 99, 99, 99, 99, 99 ), 1, 'G2P2L1M', false );
+               $this->checkC( $data, $mk( 1, 1, 1, 1, 1 ), 16, 'G2P2L1M-11111' );
+               $this->checkC( $data, $mk( 2, 2, 2, 2, 2 ), 9, 'G2P2L1M-22222' );
+               $this->checkC( $data, $mk( 3, 3, 3, 3, 3 ), 6, 'G2P2L1M-33333' );
+               $this->checkC( $data, $mk( 4, 4, 4, 4, 4 ), 4, 'G2P2L1M-44444' );
+               $this->checkC( $data, $mk( 5, 5, 5, 5, 5 ), 2, 'G2P2L1M-55555' );
+               $this->checkC( $data, $mk( 5, 5, 5, 1, 1 ), 4, 'G2P2L1M-55511' );
+               $this->checkC( $data, $mk( 5, 5, 5, 2, 2 ), 2, 'G2P2L1M-55522' );
+               $this->checkC( $data, $mk( 5, 1, 1, 5, 5 ), 10, 'G2P2L1M-51155' );
+               $this->checkC( $data, $mk( 5, 2, 2, 5, 5 ), 5, 'G2P2L1M-52255' );
        }
 
        /**
@@ -229,7 +229,7 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
         */
        public function testSameGenAndProp() {
                $this->mVerbose = false;
-               $mk = function( $g, $gDir, $p, $pDir ) {
+               $mk = function ( $g, $gDir, $p, $pDir ) {
                        return array(
                                'titles' => 'AQCT-1',
                                'generator' => 'templates',
@@ -241,31 +241,31 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
                        );
                };
                // generator + 1 prop
-               $data = $this->query( $mk(99,true,99,true), 1, 'G=P', false );
+               $data = $this->query( $mk( 99, true, 99, true ), 1, 'G=P', false );
 
-               $this->checkC( $data, $mk(1,true,1,true), 4, 'G=P-1t1t' );
-               $this->checkC( $data, $mk(2,true,2,true), 2, 'G=P-2t2t' );
-               $this->checkC( $data, $mk(3,true,3,true), 2, 'G=P-3t3t' );
-               $this->checkC( $data, $mk(1,true,3,true), 4, 'G=P-1t3t' );
-               $this->checkC( $data, $mk(3,true,1,true), 2, 'G=P-3t1t' );
+               $this->checkC( $data, $mk( 1, true, 1, true ), 4, 'G=P-1t1t' );
+               $this->checkC( $data, $mk( 2, true, 2, true ), 2, 'G=P-2t2t' );
+               $this->checkC( $data, $mk( 3, true, 3, true ), 2, 'G=P-3t3t' );
+               $this->checkC( $data, $mk( 1, true, 3, true ), 4, 'G=P-1t3t' );
+               $this->checkC( $data, $mk( 3, true, 1, true ), 2, 'G=P-3t1t' );
 
-               $this->checkC( $data, $mk(1,true,1,false), 4, 'G=P-1t1f' );
-               $this->checkC( $data, $mk(2,true,2,false), 2, 'G=P-2t2f' );
-               $this->checkC( $data, $mk(3,true,3,false), 2, 'G=P-3t3f' );
-               $this->checkC( $data, $mk(1,true,3,false), 4, 'G=P-1t3f' );
-               $this->checkC( $data, $mk(3,true,1,false), 2, 'G=P-3t1f' );
+               $this->checkC( $data, $mk( 1, true, 1, false ), 4, 'G=P-1t1f' );
+               $this->checkC( $data, $mk( 2, true, 2, false ), 2, 'G=P-2t2f' );
+               $this->checkC( $data, $mk( 3, true, 3, false ), 2, 'G=P-3t3f' );
+               $this->checkC( $data, $mk( 1, true, 3, false ), 4, 'G=P-1t3f' );
+               $this->checkC( $data, $mk( 3, true, 1, false ), 2, 'G=P-3t1f' );
 
-               $this->checkC( $data, $mk(1,false,1,true), 4, 'G=P-1f1t' );
-               $this->checkC( $data, $mk(2,false,2,true), 2, 'G=P-2f2t' );
-               $this->checkC( $data, $mk(3,false,3,true), 2, 'G=P-3f3t' );
-               $this->checkC( $data, $mk(1,false,3,true), 4, 'G=P-1f3t' );
-               $this->checkC( $data, $mk(3,false,1,true), 2, 'G=P-3f1t' );
+               $this->checkC( $data, $mk( 1, false, 1, true ), 4, 'G=P-1f1t' );
+               $this->checkC( $data, $mk( 2, false, 2, true ), 2, 'G=P-2f2t' );
+               $this->checkC( $data, $mk( 3, false, 3, true ), 2, 'G=P-3f3t' );
+               $this->checkC( $data, $mk( 1, false, 3, true ), 4, 'G=P-1f3t' );
+               $this->checkC( $data, $mk( 3, false, 1, true ), 2, 'G=P-3f1t' );
 
-               $this->checkC( $data, $mk(1,false,1,false), 4, 'G=P-1f1f' );
-               $this->checkC( $data, $mk(2,false,2,false), 2, 'G=P-2f2f' );
-               $this->checkC( $data, $mk(3,false,3,false), 2, 'G=P-3f3f' );
-               $this->checkC( $data, $mk(1,false,3,false), 4, 'G=P-1f3f' );
-               $this->checkC( $data, $mk(3,false,1,false), 2, 'G=P-3f1f' );
+               $this->checkC( $data, $mk( 1, false, 1, false ), 4, 'G=P-1f1f' );
+               $this->checkC( $data, $mk( 2, false, 2, false ), 2, 'G=P-2f2f' );
+               $this->checkC( $data, $mk( 3, false, 3, false ), 2, 'G=P-3f3f' );
+               $this->checkC( $data, $mk( 1, false, 3, false ), 4, 'G=P-1f3f' );
+               $this->checkC( $data, $mk( 3, false, 1, false ), 2, 'G=P-3f1f' );
        }
 
        /**
@@ -274,7 +274,7 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
         */
        public function testSameGenList() {
                $this->mVerbose = false;
-               $mk = function( $g, $gDir, $l, $pDir ) {
+               $mk = function ( $g, $gDir, $l, $pDir ) {
                        return array(
                                'generator' => 'allpages',
                                'gapprefix' => 'AQCT-',
@@ -287,27 +287,27 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
                        );
                };
                // generator + 1 list
-               $data = $this->query( $mk(99,true,99,true), 1, 'G=L', false );
+               $data = $this->query( $mk( 99, true, 99, true ), 1, 'G=L', false );
 
-               $this->checkC( $data, $mk(1,true,1,true), 5, 'G=L-1t1t' );
-               $this->checkC( $data, $mk(2,true,2,true), 3, 'G=L-2t2t' );
-               $this->checkC( $data, $mk(3,true,3,true), 2, 'G=L-3t3t' );
-               $this->checkC( $data, $mk(1,true,3,true), 5, 'G=L-1t3t' );
-               $this->checkC( $data, $mk(3,true,1,true), 5, 'G=L-3t1t' );
-               $this->checkC( $data, $mk(1,true,1,false), 5, 'G=L-1t1f' );
-               $this->checkC( $data, $mk(2,true,2,false), 3, 'G=L-2t2f' );
-               $this->checkC( $data, $mk(3,true,3,false), 2, 'G=L-3t3f' );
-               $this->checkC( $data, $mk(1,true,3,false), 5, 'G=L-1t3f' );
-               $this->checkC( $data, $mk(3,true,1,false), 5, 'G=L-3t1f' );
-               $this->checkC( $data, $mk(1,false,1,true), 5, 'G=L-1f1t' );
-               $this->checkC( $data, $mk(2,false,2,true), 3, 'G=L-2f2t' );
-               $this->checkC( $data, $mk(3,false,3,true), 2, 'G=L-3f3t' );
-               $this->checkC( $data, $mk(1,false,3,true), 5, 'G=L-1f3t' );
-               $this->checkC( $data, $mk(3,false,1,true), 5, 'G=L-3f1t' );
-               $this->checkC( $data, $mk(1,false,1,false), 5, 'G=L-1f1f' );
-               $this->checkC( $data, $mk(2,false,2,false), 3, 'G=L-2f2f' );
-               $this->checkC( $data, $mk(3,false,3,false), 2, 'G=L-3f3f' );
-               $this->checkC( $data, $mk(1,false,3,false), 5, 'G=L-1f3f' );
-               $this->checkC( $data, $mk(3,false,1,false), 5, 'G=L-3f1f' );
+               $this->checkC( $data, $mk( 1, true, 1, true ), 5, 'G=L-1t1t' );
+               $this->checkC( $data, $mk( 2, true, 2, true ), 3, 'G=L-2t2t' );
+               $this->checkC( $data, $mk( 3, true, 3, true ), 2, 'G=L-3t3t' );
+               $this->checkC( $data, $mk( 1, true, 3, true ), 5, 'G=L-1t3t' );
+               $this->checkC( $data, $mk( 3, true, 1, true ), 5, 'G=L-3t1t' );
+               $this->checkC( $data, $mk( 1, true, 1, false ), 5, 'G=L-1t1f' );
+               $this->checkC( $data, $mk( 2, true, 2, false ), 3, 'G=L-2t2f' );
+               $this->checkC( $data, $mk( 3, true, 3, false ), 2, 'G=L-3t3f' );
+               $this->checkC( $data, $mk( 1, true, 3, false ), 5, 'G=L-1t3f' );
+               $this->checkC( $data, $mk( 3, true, 1, false ), 5, 'G=L-3t1f' );
+               $this->checkC( $data, $mk( 1, false, 1, true ), 5, 'G=L-1f1t' );
+               $this->checkC( $data, $mk( 2, false, 2, true ), 3, 'G=L-2f2t' );
+               $this->checkC( $data, $mk( 3, false, 3, true ), 2, 'G=L-3f3t' );
+               $this->checkC( $data, $mk( 1, false, 3, true ), 5, 'G=L-1f3t' );
+               $this->checkC( $data, $mk( 3, false, 1, true ), 5, 'G=L-3f1t' );
+               $this->checkC( $data, $mk( 1, false, 1, false ), 5, 'G=L-1f1f' );
+               $this->checkC( $data, $mk( 2, false, 2, false ), 3, 'G=L-2f2f' );
+               $this->checkC( $data, $mk( 3, false, 3, false ), 2, 'G=L-3f3f' );
+               $this->checkC( $data, $mk( 1, false, 3, false ), 5, 'G=L-1f3f' );
+               $this->checkC( $data, $mk( 3, false, 1, false ), 5, 'G=L-3f1f' );
        }
 }
index 4717479..e0a84e1 100644 (file)
@@ -36,7 +36,7 @@ abstract class ApiQueryContinueTestBase extends ApiQueryTestBase {
        /**
         * Run query() and compare against expected values
         */
-       protected function checkC( $expected, $params, $expectedCount, $id, $continue = true  ) {
+       protected function checkC( $expected, $params, $expectedCount, $id, $continue = true ) {
                $result = $this->query( $params, $expectedCount, $id, $continue );
                $this->assertResult( $expected, $result, $id );
        }
@@ -52,7 +52,7 @@ abstract class ApiQueryContinueTestBase extends ApiQueryTestBase {
         */
        protected function query( $params, $expectedCount, $id, $useContinue = true ) {
                if ( isset( $params['action'] ) ) {
-                       $this->assertEquals( 'query', $params['action'], 'Invalid query action');
+                       $this->assertEquals( 'query', $params['action'], 'Invalid query action' );
                } else {
                        $params['action'] = 'query';
                }
@@ -64,7 +64,7 @@ abstract class ApiQueryContinueTestBase extends ApiQueryTestBase {
                $continue = array();
                do {
                        $request = array_merge( $params, $continue );
-                       uksort( $request, function( $a, $b ) {
+                       uksort( $request, function ( $a, $b ) {
                                // put 'continue' params at the end - lazy method
                                $a = strpos( $a, 'continue' ) !== false ? 'zzz ' . $a : $a;
                                $b = strpos( $b, 'continue' ) !== false ? 'zzz ' . $b : $b;
@@ -74,7 +74,7 @@ abstract class ApiQueryContinueTestBase extends ApiQueryTestBase {
                        //$reqStr = str_replace( '&', ' & ', $reqStr );
                        $this->assertLessThan( $expectedCount, $count, "$id more data: $reqStr" );
                        if ( $this->mVerbose ) {
-                               print ("$id (#$count): $reqStr\n");
+                               print ( "$id (#$count): $reqStr\n" );
                        }
                        try {
                                $data = $this->doApiRequest( $request );
@@ -107,48 +107,52 @@ abstract class ApiQueryContinueTestBase extends ApiQueryTestBase {
                        } elseif ( !$useContinue ) {
                                $this->assertFalse( 'Non-smart query must be requested all at once' );
                        }
-               } while( true );
+               } while ( true );
        }
 
        private function printResult( $data ) {
                $q = $data['query'];
                $print = array();
-               if (isset($q['pages'])) {
-                       foreach ($q['pages'] as $p) {
+               if ( isset( $q['pages'] ) ) {
+                       foreach ( $q['pages'] as $p ) {
                                $m = $p['title'];
-                               if (isset($p['links'])) {
-                                       $m .= '/[' . implode(',', array_map(
-                                               function ($v) {
+                               if ( isset( $p['links'] ) ) {
+                                       $m .= '/[' . implode( ',', array_map(
+                                               function ( $v ) {
                                                        return $v['title'];
                                                },
-                                               $p['links'])) . ']';
+                                               $p['links'] ) ) . ']';
                                }
-                               if (isset($p['categories'])) {
-                                       $m .= '/(' . implode(',', array_map(
-                                               function ($v) {
-                                                       return str_replace('Category:', '', $v['title']);
+                               if ( isset( $p['categories'] ) ) {
+                                       $m .= '/(' . implode( ',', array_map(
+                                               function ( $v ) {
+                                                       return str_replace( 'Category:', '', $v['title'] );
                                                },
-                                               $p['categories'])) . ')';
+                                               $p['categories'] ) ) . ')';
                                }
                                $print[] = $m;
                        }
                }
-               if (isset($q['allcategories'])) {
-                       $print[] = '*Cats/(' . implode(',', array_map(
-                               function ($v) { return $v['*']; },
-                               $q['allcategories'])) . ')';
+               if ( isset( $q['allcategories'] ) ) {
+                       $print[] = '*Cats/(' . implode( ',', array_map(
+                               function ( $v ) {
+                                       return $v['*'];
+                               },
+                               $q['allcategories'] ) ) . ')';
                }
                self::GetItems( $q, 'allpages', 'Pages', $print );
                self::GetItems( $q, 'alllinks', 'Links', $print );
                self::GetItems( $q, 'alltransclusions', 'Trnscl', $print );
-               print(' ' . implode('  ', $print) . "\n");
+               print( ' ' . implode( '  ', $print ) . "\n" );
        }
 
        private static function GetItems( $q, $moduleName, $name, &$print ) {
-               if (isset($q[$moduleName])) {
-                       $print[] = "*$name/[" . implode(',',
-                               array_map( function ($v) { return $v['title']; },
-                                               $q[$moduleName])) . ']';
+               if ( isset( $q[$moduleName] ) ) {
+                       $print[] = "*$name/[" . implode( ',',
+                               array_map( function ( $v ) {
+                                               return $v['title'];
+                                       },
+                                       $q[$moduleName] ) ) . ']';
                }
        }
 
@@ -164,12 +168,12 @@ abstract class ApiQueryContinueTestBase extends ApiQueryTestBase {
                        $this->assertEquals( $results, $newResult, 'Repeated result must be the same as before' );
                } else {
                        $sort = null;
-                       foreach( $newResult as $key => $value ) {
+                       foreach ( $newResult as $key => $value ) {
                                if ( !$numericIds && $sort === null ) {
                                        if ( !is_array( $value ) ) {
                                                $sort = false;
                                        } elseif ( array_key_exists( 'title', $value ) ) {
-                                               $sort = function( $a, $b ) {
+                                               $sort = function ( $a, $b ) {
                                                        return strcmp( $a['title'], $b['title'] );
                                                };
                                        } else {
index 7b9f8ed..3d96beb 100644 (file)
@@ -43,7 +43,7 @@ STR;
        protected function merge( /*...*/ ) {
                $request = array();
                $expected = array();
-               foreach ( func_get_args() as $v ) {
+               foreach ( func_get_args() as $v ) {
                        list( $req, $exp ) = $this->validateRequestExpectedPair( $v );
                        $request = array_merge_recursive( $request, $req );
                        $this->mergeExpected( $expected, $exp );
@@ -57,7 +57,7 @@ STR;
         */
        private function validateRequestExpectedPair( $v ) {
                $this->assertType( 'array', $v, self::PARAM_ASSERT );
-               $this->assertEquals( 2, count($v), self::PARAM_ASSERT );
+               $this->assertEquals( 2, count( $v ), self::PARAM_ASSERT );
                $this->assertArrayHasKey( 0, $v, self::PARAM_ASSERT );
                $this->assertArrayHasKey( 1, $v, self::PARAM_ASSERT );
                $this->assertType( 'array', $v[0], self::PARAM_ASSERT );
@@ -71,7 +71,7 @@ STR;
        private function mergeExpected( &$all, $item ) {
                foreach ( $item as $k => $v ) {
                        if ( array_key_exists( $k, $all ) ) {
-                               if ( is_array ( $all[$k] ) ) {
+                               if ( is_array( $all[$k] ) ) {
                                        $this->mergeExpected( $all[$k], $v );
                                } else {
                                        $this->assertEquals( $all[$k], $v );
index 3b3e4a6..ada453c 100644 (file)
@@ -64,7 +64,7 @@ class MessageCacheTest extends MediaWikiLangTestCase {
                global $wgContLang;
 
                $title = Title::newFromText(
-                       ($lang == $wgContLang->getCode()) ? $title : "$title/$lang",
+                       ( $lang == $wgContLang->getCode() ) ? $title : "$title/$lang",
                        NS_MEDIAWIKI
                );
                $wikiPage = new WikiPage( $title );
index ac8dcef..67d4fde 100644 (file)
@@ -257,8 +257,7 @@ class ContentHandlerTest extends MediaWikiTestCase {
                } catch ( MWException $ex ) {
                        if ( !$shouldFail ) {
                                $this->fail( "ContentHandler::makeContent failed unexpectedly: " . $ex->getMessage() );
-                       }
-                       else {
+                       } else {
                                // dummy, so we don't get the "test did not perform any assertions" message.
                                $this->assertTrue( true );
                        }
index 4eda827..39611cb 100644 (file)
@@ -36,7 +36,7 @@ class FileBackendTest extends MediaWikiTestCase {
                        }
                } else {
                        $this->singleBackend = new FSFileBackend( array(
-                               'name'        => 'localtesting',
+                               'name' => 'localtesting',
                                'lockManager' => 'fsLockManager',
                                #'parallelize' => 'implicit',
                                'containerPaths' => array(
@@ -45,23 +45,23 @@ class FileBackendTest extends MediaWikiTestCase {
                        ) );
                }
                $this->multiBackend = new FileBackendMultiWrite( array(
-                       'name'        => 'localtesting',
+                       'name' => 'localtesting',
                        'lockManager' => 'fsLockManager',
                        'parallelize' => 'implicit',
-                       'backends'    => array(
+                       'backends' => array(
                                array(
-                                       'name'          => 'localmultitesting1',
-                                       'class'         => 'FSFileBackend',
-                                       'lockManager'   => 'nullLockManager',
+                                       'name' => 'localmultitesting1',
+                                       'class' => 'FSFileBackend',
+                                       'lockManager' => 'nullLockManager',
                                        'containerPaths' => array(
                                                'unittest-cont1' => "{$tmpPrefix}-localtestingmulti1-cont1",
                                                'unittest-cont2' => "{$tmpPrefix}-localtestingmulti1-cont2" ),
                                        'isMultiMaster' => false
                                ),
                                array(
-                                       'name'          => 'localmultitesting2',
-                                       'class'         => 'FSFileBackend',
-                                       'lockManager'   => 'nullLockManager',
+                                       'name' => 'localmultitesting2',
+                                       'class' => 'FSFileBackend',
+                                       'lockManager' => 'nullLockManager',
                                        'containerPaths' => array(
                                                'unittest-cont1' => "{$tmpPrefix}-localtestingmulti2-cont1",
                                                'unittest-cont2' => "{$tmpPrefix}-localtestingmulti2-cont2" ),
@@ -823,7 +823,7 @@ class FileBackendTest extends MediaWikiTestCase {
                        $status = $this->prepare( array( 'dir' => dirname( $path ) ) );
                        $this->assertGoodStatus( $status,
                                "Preparing $path succeeded without warnings ($backendName)." );
-                       $createOps[] = array( 'op' => 'create', 'dst' => $path, 'content' => mt_rand(0, 50000) );
+                       $createOps[] = array( 'op' => 'create', 'dst' => $path, 'content' => mt_rand( 0, 50000 ) );
                        $copyOps[] = array( 'op' => 'copy', 'src' => $path, 'dst' => "$path-2" );
                        $moveOps[] = array( 'op' => 'move', 'src' => "$path-2", 'dst' => "$path-3" );
                        $purgeOps[] = array( 'op' => 'delete', 'src' => $path );
@@ -907,8 +907,8 @@ class FileBackendTest extends MediaWikiTestCase {
                foreach ( $srcs as $i => $source ) {
                        $this->prepare( array( 'dir' => dirname( $source ) ) );
                        $ops[] = array(
-                               'op'      => 'create', // operation
-                               'dst'     => $source, // source
+                               'op' => 'create', // operation
+                               'dst' => $source, // source
                                'content' => $srcsContent[$i]
                        );
                        $expContent .= $srcsContent[$i];
@@ -1868,7 +1868,9 @@ class FileBackendTest extends MediaWikiTestCase {
                }
 
                $iter = $this->backend->getFileList( array( 'dir' => "$base/unittest-cont1/not/exists" ) );
-               foreach ( $iter as $iter ) {} // no errors
+               foreach ( $iter as $iter ) {
+                       // no errors
+               }
        }
 
        public function testGetDirectoryList() {
@@ -2065,7 +2067,10 @@ class FileBackendTest extends MediaWikiTestCase {
                }
 
                $iter = $this->backend->getDirectoryList( array( 'dir' => "$base/unittest-cont1/not/exists" ) );
-               foreach ( $iter as $file ) {} // no errors
+               foreach ( $iter as $file ) {
+                       // no errors
+               }
+
                $items = is_array( $iter ) ? $iter : iterator_to_array( $iter );
                $this->assertEquals( array(), $items, "Directory listing is empty." );
 
@@ -2105,7 +2110,7 @@ class FileBackendTest extends MediaWikiTestCase {
                        "subdir2/subdir/sub/120-px-file.txt",
                );
 
-               for ( $i=0; $i<25; $i++ ) {
+               for ( $i = 0; $i < 25; $i++ ) {
                        $status = $this->backend->lockFiles( $paths, LockManager::LOCK_EX );
                        $this->assertEquals( print_r( array(), true ), print_r( $status->errors, true ),
                                "Locking of files succeeded ($backendName) ($i)." );
index 7d4b2bb..a905f06 100644 (file)
@@ -43,7 +43,7 @@ class JobQueueTest extends MediaWikiTestCase {
                foreach ( $variants as $q => $settings ) {
                        try {
                                $this->$q = JobQueue::factory( $settings + $baseConfig );
-                               if ( ! ( $this->$q instanceof JobQueueDB ) ) {
+                               if ( !( $this->$q instanceof JobQueueDB ) ) {
                                        $this->$q->setTestingPrefix( 'unittests-' . wfRandomString( 32 ) );
                                }
                        } catch ( MWException $e ) {}; // unsupported? (@TODO: what if it was another error?)
@@ -52,10 +52,12 @@ class JobQueueTest extends MediaWikiTestCase {
 
        protected function tearDown() {
                parent::tearDown();
-               foreach ( array(
-                       'queueRand', 'queueRandTTL', 'queueTimestamp', 'queueTimestampTTL',
-                       'queueFifo', 'queueFifoTTL'
-               ) as $q ) {
+               foreach (
+                       array(
+                               'queueRand', 'queueRandTTL', 'queueTimestamp', 'queueTimestampTTL',
+                               'queueFifo', 'queueFifoTTL'
+                       ) as $q
+               ) {
                        if ( $this->$q ) {
                                do {
                                        $job = $this->$q->pop();
@@ -153,15 +155,16 @@ class JobQueueTest extends MediaWikiTestCase {
                        $this->markTestSkipped( $desc );
                }
 
-
                $this->assertTrue( $queue->isEmpty(), "Queue is empty ($desc)" );
 
                $queue->flushCaches();
                $this->assertEquals( 0, $queue->getSize(), "Queue is empty ($desc)" );
                $this->assertEquals( 0, $queue->getAcquiredCount(), "Queue is empty ($desc)" );
 
-               $this->assertTrue( $queue->batchPush(
-                               array( $this->newDedupedJob(), $this->newDedupedJob(), $this->newDedupedJob() ) ),
+               $this->assertTrue(
+                       $queue->batchPush(
+                               array( $this->newDedupedJob(), $this->newDedupedJob(), $this->newDedupedJob() )
+                       ),
                        "Push worked ($desc)" );
 
                $this->assertFalse( $queue->isEmpty(), "Queue is not empty ($desc)" );
@@ -170,9 +173,12 @@ class JobQueueTest extends MediaWikiTestCase {
                $this->assertEquals( 1, $queue->getSize(), "Queue size is correct ($desc)" );
                $this->assertEquals( 0, $queue->getAcquiredCount(), "No jobs active ($desc)" );
 
-               $this->assertTrue( $queue->batchPush(
-                               array( $this->newDedupedJob(), $this->newDedupedJob(), $this->newDedupedJob() ) ),
-                       "Push worked ($desc)" );
+               $this->assertTrue(
+                       $queue->batchPush(
+                               array( $this->newDedupedJob(), $this->newDedupedJob(), $this->newDedupedJob() )
+                       ),
+                       "Push worked ($desc)"
+               );
 
                $this->assertFalse( $queue->isEmpty(), "Queue is not empty ($desc)" );
 
@@ -206,7 +212,6 @@ class JobQueueTest extends MediaWikiTestCase {
                        $this->markTestSkipped( $desc );
                }
 
-
                $this->assertTrue( $queue->isEmpty(), "Queue is empty ($desc)" );
 
                $queue->flushCaches();
@@ -260,7 +265,6 @@ class JobQueueTest extends MediaWikiTestCase {
                        $this->markTestSkipped( $desc );
                }
 
-
                $this->assertTrue( $queue->isEmpty(), "Queue is empty ($desc)" );
 
                $queue->flushCaches();
index 8bc908d..3fcc0e5 100644 (file)
@@ -34,7 +34,7 @@ class LanguageBe_taraskTest extends LanguageClassesTestCase {
 
        /** @dataProvider providePlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'few', 'many', 'other' );
+               $forms = array( 'one', 'few', 'many', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
@@ -44,7 +44,7 @@ class LanguageBe_taraskTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'one', 1 ),
                        array( 'many', 11 ),
                        array( 'one', 91 ),
@@ -61,7 +61,7 @@ class LanguageBe_taraskTest extends LanguageClassesTestCase {
 
        /** @dataProvider providePluralTwoForms */
        function testPluralTwoForms( $result, $value ) {
-               $forms =  array( 'one', 'other' );
+               $forms = array( 'one', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
index 06374d4..93ee0f0 100644 (file)
@@ -19,7 +19,7 @@ class LanguageCsTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'few', 2 ),
index a368371..562d6d9 100644 (file)
@@ -9,7 +9,7 @@
 class LanguageCuTest extends LanguageClassesTestCase {
        /** @dataProvider providePlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'two', 'few', 'other' );
+               $forms = array( 'one', 'two', 'few', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
@@ -19,7 +19,7 @@ class LanguageCuTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'two', 2 ),
index 221a498..435da4f 100644 (file)
@@ -19,7 +19,7 @@ class LanguageCyTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'zero', 0 ),
                        array( 'one', 1 ),
                        array( 'two', 2 ),
index da7cf12..73c4800 100644 (file)
@@ -19,7 +19,7 @@ class LanguageGaTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'two', 2 ),
index 4ff97ea..edf8e50 100644 (file)
@@ -14,7 +14,7 @@ class LanguageGdTest extends LanguageClassesTestCase {
        }
 
        public static function providerPlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'two', 2 ),
@@ -33,15 +33,15 @@ class LanguageGdTest extends LanguageClassesTestCase {
        }
 
        public static function providerPluralExplicit() {
-               return array (
-                               array( 'other', 0 ),
-                               array( 'one', 1 ),
-                               array( 'two', 2 ),
-                               array( 'Form11', 11 ),
-                               array( 'Form12', 12 ),
-                               array( 'few', 3 ),
-                               array( 'few', 19 ),
-                               array( 'other', 200 ),
+               return array(
+                       array( 'other', 0 ),
+                       array( 'one', 1 ),
+                       array( 'two', 2 ),
+                       array( 'Form11', 11 ),
+                       array( 'Form12', 12 ),
+                       array( 'few', 3 ),
+                       array( 'few', 19 ),
+                       array( 'other', 200 ),
                );
        }
 }
index ef95c5f..71c0160 100644 (file)
@@ -11,7 +11,7 @@ class LanguageGvTest extends LanguageClassesTestCase {
        function testPlural( $result, $value ) {
                // This is not compatible with CLDR plural rules http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#gv
                // What does this mean? Is there a hard-coded override for gv somewhere? -Ryan Kaldari 2013-01-28
-               $forms =  array( 'Form 1', 'Form 2', 'Form 3', 'Form 4' );
+               $forms = array( 'Form 1', 'Form 2', 'Form 3', 'Form 4' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
@@ -22,7 +22,7 @@ class LanguageGvTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'Form 4', 0 ),
                        array( 'Form 2', 1 ),
                        array( 'Form 3', 2 ),
index 7849349..a8524bb 100644 (file)
@@ -43,7 +43,7 @@ class LanguageHeTest extends LanguageClassesTestCase {
        }
 
        public static function provideTwoPluralForms() {
-               return array (
+               return array(
                        array( 'other', 0 ), // Zero - plural
                        array( 'one', 1 ), // Singular
                        array( 'other', 2 ), // No third form provided, use it as plural
@@ -54,7 +54,7 @@ class LanguageHeTest extends LanguageClassesTestCase {
        }
 
        public static function provideThreePluralForms() {
-               return array (
+               return array(
                        array( 'other', 0 ), // Zero - plural
                        array( 'one', 1 ), // Singular
                        array( 'two', 2 ), // Dual
@@ -65,7 +65,7 @@ class LanguageHeTest extends LanguageClassesTestCase {
        }
 
        public static function provideFourPluralForms() {
-               return array (
+               return array(
                        array( 'other', 0 ), // Zero - plural
                        array( 'one', 1 ), // Singular
                        array( 'two', 2 ), // Dual
@@ -83,31 +83,31 @@ class LanguageHeTest extends LanguageClassesTestCase {
        // The comments in the beginning of the line help avoid RTL problems
        // with text editors.
        public static function provideGrammar() {
-               return array (
+               return array(
                        array(
-                               /* result */ 'וויקיפדיה',
-                               /* word   */ 'ויקיפדיה',
-                               /* case   */ 'תחילית',
+                               /* result */'וויקיפדיה',
+                               /* word   */'ויקיפדיה',
+                               /* case   */'תחילית',
                        ),
                        array(
-                               /* result */ 'וולפגנג',
-                               /* word   */ 'וולפגנג',
-                               /* case   */ 'prefixed',
+                               /* result */'וולפגנג',
+                               /* word   */'וולפגנג',
+                               /* case   */'prefixed',
                        ),
                        array(
-                               /* result */ 'קובץ',
-                               /* word   */ 'הקובץ',
-                               /* case   */ 'תחילית',
+                               /* result */'קובץ',
+                               /* word   */'הקובץ',
+                               /* case   */'תחילית',
                        ),
                        array(
-                               /* result */ 'Ö¾Wikipedia',
-                               /* word   */ 'Wikipedia',
-                               /* case   */ 'תחילית',
+                               /* result */'Ö¾Wikipedia',
+                               /* word   */'Wikipedia',
+                               /* case   */'תחילית',
                        ),
                        array(
-                               /* result */ 'Ö¾1995',
-                               /* word   */ '1995',
-                               /* case   */ 'תחילית',
+                               /* result */'Ö¾1995',
+                               /* word   */'1995',
+                               /* case   */'תחילית',
                        ),
                );
        }
index badfd11..7516bac 100644 (file)
@@ -19,7 +19,7 @@ class LanguageHrTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'many', 0 ),
                        array( 'one', 1 ),
                        array( 'few', 2 ),
index f520b7e..1abc375 100644 (file)
@@ -20,7 +20,7 @@ class LanguageHyTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'other', 2 ),
index e863490..291c59b 100644 (file)
@@ -19,7 +19,7 @@ class LanguageKshTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'zero', 0 ),
                        array( 'one', 1 ),
                        array( 'other', 2 ),
index 45f083b..e5a10b5 100644 (file)
@@ -9,7 +9,7 @@
 class LanguageLtTest extends LanguageClassesTestCase {
        /** @dataProvider providePlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'few', 'other' );
+               $forms = array( 'one', 'few', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
@@ -19,7 +19,7 @@ class LanguageLtTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'few', 2 ),
@@ -36,13 +36,13 @@ class LanguageLtTest extends LanguageClassesTestCase {
 
        /** @dataProvider providePluralTwoForms */
        function testOneFewPlural( $result, $value ) {
-               $forms =  array( 'one', 'other' );
+               $forms = array( 'one', 'other' );
                // This fails for 21, but not sure why.
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        public static function providePluralTwoForms() {
-               return array (
+               return array(
                        array( 'one', 1 ),
                        array( 'other', 2 ),
                        array( 'other', 15 ),
index 3ff9589..368ac8c 100644 (file)
@@ -19,7 +19,7 @@ class LanguageLvTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'zero', 0 ),
                        array( 'one', 1 ),
                        array( 'other', 11 ),
index 4ff2e3e..0ae533d 100644 (file)
@@ -19,7 +19,7 @@ class LanguageMkTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'other', 11 ),
index 3ffa4e7..3b162b7 100644 (file)
@@ -19,11 +19,11 @@ class LanguageMoTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
-                       array( 'few',   0 ),
-                       array( 'one',   1 ),
-                       array( 'few',   2 ),
-                       array( 'few',   19 ),
+               return array(
+                       array( 'few', 0 ),
+                       array( 'one', 1 ),
+                       array( 'few', 2 ),
+                       array( 'few', 19 ),
                        array( 'other', 20 ),
                        array( 'other', 99 ),
                        array( 'other', 100 ),
index 350aa08..12af2e8 100644 (file)
@@ -19,13 +19,13 @@ class LanguageMtTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
-                       array( 'few',   0 ),
-                       array( 'one',   1 ),
-                       array( 'few',   2 ),
-                       array( 'few',   10 ),
-                       array( 'many',  11 ),
-                       array( 'many',  19 ),
+               return array(
+                       array( 'few', 0 ),
+                       array( 'one', 1 ),
+                       array( 'few', 2 ),
+                       array( 'few', 10 ),
+                       array( 'many', 11 ),
+                       array( 'many', 19 ),
                        array( 'other', 20 ),
                        array( 'other', 99 ),
                        array( 'other', 100 ),
@@ -46,23 +46,23 @@ class LanguageMtTest extends LanguageClassesTestCase {
        }
 
        public static function providerPluralTwoForms() {
-               return array (
-                       array( 'other',  0 ),
-                       array( 'one',   1 ),
-                       array( 'other',  2 ),
-                       array( 'other',  10 ),
-                       array( 'other',  11 ),
-                       array( 'other',  19 ),
-                       array( 'other',  20 ),
-                       array( 'other',  99 ),
-                       array( 'other',  100 ),
-                       array( 'other',  101 ),
-                       array( 'other',  102 ),
-                       array( 'other',  110 ),
-                       array( 'other',  111 ),
-                       array( 'other',  119 ),
-                       array( 'other',  120 ),
-                       array( 'other',  201 ),
+               return array(
+                       array( 'other', 0 ),
+                       array( 'one', 1 ),
+                       array( 'other', 2 ),
+                       array( 'other', 10 ),
+                       array( 'other', 11 ),
+                       array( 'other', 19 ),
+                       array( 'other', 20 ),
+                       array( 'other', 99 ),
+                       array( 'other', 100 ),
+                       array( 'other', 101 ),
+                       array( 'other', 102 ),
+                       array( 'other', 110 ),
+                       array( 'other', 111 ),
+                       array( 'other', 119 ),
+                       array( 'other', 120 ),
+                       array( 'other', 201 ),
                );
        }
 }
index 059de44..1d62567 100644 (file)
@@ -19,9 +19,9 @@ class LanguageNsoTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
-                       array( 'one',  0 ),
-                       array( 'one',  1 ),
+               return array(
+                       array( 'one', 0 ),
+                       array( 'one', 1 ),
                        array( 'other', 2 ),
                );
        }
index 837fc3a..9ec2a88 100644 (file)
@@ -19,23 +19,23 @@ class LanguagePlTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
-                       array( 'many',  0 ),
-                       array( 'one',   1 ),
-                       array( 'few',   2 ),
-                       array( 'few',   3 ),
-                       array( 'few',   4 ),
-                       array( 'many',  5 ),
-                       array( 'many',  9 ),
-                       array( 'many',  10 ),
-                       array( 'many',  11 ),
-                       array( 'many',  21 ),
-                       array( 'few',   22 ),
-                       array( 'few',   23 ),
-                       array( 'few',   24 ),
-                       array( 'many',  25 ),
-                       array( 'many',  200 ),
-                       array( 'many',  201 ),
+               return array(
+                       array( 'many', 0 ),
+                       array( 'one', 1 ),
+                       array( 'few', 2 ),
+                       array( 'few', 3 ),
+                       array( 'few', 4 ),
+                       array( 'many', 5 ),
+                       array( 'many', 9 ),
+                       array( 'many', 10 ),
+                       array( 'many', 11 ),
+                       array( 'many', 21 ),
+                       array( 'few', 22 ),
+                       array( 'few', 23 ),
+                       array( 'few', 24 ),
+                       array( 'many', 25 ),
+                       array( 'many', 200 ),
+                       array( 'many', 201 ),
                );
        }
 
@@ -46,23 +46,23 @@ class LanguagePlTest extends LanguageClassesTestCase {
        }
 
        public static function providerPluralTwoForms() {
-               return array (
-                       array( 'other',  0 ),
-                       array( 'one',   1 ),
-                       array( 'other',  2 ),
-                       array( 'other',  3 ),
-                       array( 'other',  4 ),
-                       array( 'other',  5 ),
-                       array( 'other',  9 ),
-                       array( 'other',  10 ),
-                       array( 'other',  11 ),
-                       array( 'other',  21 ),
-                       array( 'other',  22 ),
-                       array( 'other',  23 ),
-                       array( 'other',  24 ),
-                       array( 'other',  25 ),
-                       array( 'other',  200 ),
-                       array( 'other',  201 ),
+               return array(
+                       array( 'other', 0 ),
+                       array( 'one', 1 ),
+                       array( 'other', 2 ),
+                       array( 'other', 3 ),
+                       array( 'other', 4 ),
+                       array( 'other', 5 ),
+                       array( 'other', 9 ),
+                       array( 'other', 10 ),
+                       array( 'other', 11 ),
+                       array( 'other', 21 ),
+                       array( 'other', 22 ),
+                       array( 'other', 23 ),
+                       array( 'other', 24 ),
+                       array( 'other', 25 ),
+                       array( 'other', 200 ),
+                       array( 'other', 201 ),
                );
        }
 }
index 70324f5..919a744 100644 (file)
@@ -19,11 +19,11 @@ class LanguageRoTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
-                       array( 'few',   0 ),
-                       array( 'one',   1 ),
-                       array( 'few',   2 ),
-                       array( 'few',   19 ),
+               return array(
+                       array( 'few', 0 ),
+                       array( 'one', 1 ),
+                       array( 'few', 2 ),
+                       array( 'few', 19 ),
                        array( 'other', 20 ),
                        array( 'other', 99 ),
                        array( 'other', 100 ),
index ccfda20..bfd5074 100644 (file)
@@ -20,7 +20,7 @@ class LanguageRuTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'one', 1 ),
                        array( 'many', 11 ),
                        array( 'one', 91 ),
@@ -37,7 +37,7 @@ class LanguageRuTest extends LanguageClassesTestCase {
 
        /** @dataProvider providePluralTwoForms */
        function testPluralTwoForms( $result, $value ) {
-               $forms =  array( 'one', 'other' );
+               $forms = array( 'one', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
index 9b9297c..70efa3b 100644 (file)
@@ -19,7 +19,7 @@ class LanguageSeTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'two', 2 ),
@@ -34,7 +34,7 @@ class LanguageSeTest extends LanguageClassesTestCase {
        }
 
        public static function providerPluralTwoForms() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'other', 2 ),
index 8dd18ea..9f34db5 100644 (file)
@@ -19,9 +19,9 @@ class LanguageShTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'many', 0 ),
-                       array( 'one',  1 ),
+                       array( 'one', 1 ),
                        array( 'few', 2 ),
                        array( 'few', 4 ),
                        array( 'many', 5 ),
index da09b56..3f32c66 100644 (file)
@@ -20,7 +20,7 @@ class LanguageSkTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'few', 2 ),
index 8329791..84c2e01 100644 (file)
@@ -20,12 +20,12 @@ class LanguageSlTest extends LanguageClassesTestCase {
        }
 
        public static function providerPlural() {
-               return array (
-                       array( 'other',  0 ),
-                       array( 'one',   1 ),
-                       array( 'two',   2 ),
-                       array( 'few',   3 ),
-                       array( 'few',   4 ),
+               return array(
+                       array( 'other', 0 ),
+                       array( 'one', 1 ),
+                       array( 'two', 2 ),
+                       array( 'few', 3 ),
+                       array( 'few', 4 ),
                        array( 'other', 5 ),
                        array( 'other', 99 ),
                        array( 'other', 100 ),
index 2eb8113..5819831 100644 (file)
@@ -19,7 +19,7 @@ class LanguageSmaTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'two', 2 ),
@@ -34,7 +34,7 @@ class LanguageSmaTest extends LanguageClassesTestCase {
        }
 
        public static function providerPluralTwoForms() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'other', 2 ),
index 05e8875..11d00f3 100644 (file)
@@ -122,7 +122,7 @@ class LanguageSrTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'one', 1 ),
                        array( 'many', 11 ),
                        array( 'one', 91 ),
@@ -207,8 +207,8 @@ class LanguageSrTest extends LanguageClassesTestCase {
                return $this->getLang()
                        ->mConverter
                        ->convertTo(
-                       $text, $variant
-               );
+                               $text, $variant
+                       );
        }
 
        function convertToCyrillic( $text ) {
index b2cc4c3..36446c4 100644 (file)
@@ -19,9 +19,9 @@ class LanguageTiTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
-                       array( 'one',  0 ),
-                       array( 'one',  1 ),
+               return array(
+                       array( 'one', 0 ),
+                       array( 'one', 1 ),
                        array( 'other', 2 ),
                );
        }
index 0299653..422ad43 100644 (file)
@@ -19,9 +19,9 @@ class LanguageTlTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
-                       array( 'one',  0 ),
-                       array( 'one',  1 ),
+               return array(
+                       array( 'one', 0 ),
+                       array( 'one', 1 ),
                        array( 'other', 2 ),
                );
        }
index 66cd183..3180d30 100644 (file)
@@ -20,7 +20,7 @@ class LanguageUkTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
+               return array(
                        array( 'one', 1 ),
                        array( 'many', 11 ),
                        array( 'one', 91 ),
index 813222d..ffa3375 100644 (file)
@@ -19,9 +19,9 @@ class LanguageWaTest extends LanguageClassesTestCase {
        }
 
        public static function providePlural() {
-               return array (
-                       array( 'one',  0 ),
-                       array( 'one',  1 ),
+               return array(
+                       array( 'one', 0 ),
+                       array( 'one', 1 ),
                        array( 'other', 2 ),
                );
        }
index 2ec0744..2a1ebc3 100755 (executable)
@@ -50,8 +50,11 @@ class PHPUnitMaintClass extends Maintenance {
 
                // Bug 44192 Do not attempt to send a real e-mail
                Hooks::clear( 'AlternateUserMailer' );
-               Hooks::register( 'AlternateUserMailer',
-                       function() { return false; }
+               Hooks::register(
+                       'AlternateUserMailer',
+                       function () {
+                               return false;
+                       }
                );
        }
 
index 28d38ab..3200e0b 100644 (file)
@@ -16,9 +16,10 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite {
        }
 
        protected function setUp() {
-               global $wgParser, $wgParserConf, $IP, $messageMemc, $wgMemc,
-                       $wgUser, $wgLang, $wgOut, $wgRequest, $wgStyleDirectory, $wgEnableParserCache,
-                       $wgNamespaceAliases, $wgNamespaceProtection, $parserMemc;
+               global $wgParser, $wgParserConf, $IP, $messageMemc, $wgMemc, $wgUser,
+                       $wgLang, $wgOut, $wgRequest, $wgStyleDirectory,
+                       $wgEnableParserCache, $wgNamespaceAliases, $wgNamespaceProtection,
+                       $parserMemc;
 
                $tmpGlobals = array();
 
index 4b8ee0d..a6f729b 100644 (file)
@@ -55,8 +55,9 @@
 
        /**
         * CompletenessTest
+        *
+        * Adds toggle checkbox to header
         */
-       // Adds toggle checkbox to header
        QUnit.config.urlConfig.push( {
                id: 'completenesstest',
                label: 'Run CompletenessTest',
@@ -95,8 +96,9 @@
 
        /**
         * Test environment recommended for all QUnit test modules
+        *
+        * Whether to log environment changes to the console
         */
-        // Whether to log environment changes to the console
        QUnit.config.urlConfig.push( 'mwlogenv' );
 
        /**