Update formatting
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Fri, 15 Feb 2013 10:27:48 +0000 (11:27 +0100)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 15 Feb 2013 12:53:41 +0000 (12:53 +0000)
7 of n.

Change-Id: I07687a4381f29fd9fc73666e460f25769ed54092

47 files changed:
tests/phpunit/languages/LanguageAmTest.php
tests/phpunit/languages/LanguageArTest.php
tests/phpunit/languages/LanguageBeTest.php
tests/phpunit/languages/LanguageBe_taraskTest.php
tests/phpunit/languages/LanguageBhoTest.php
tests/phpunit/languages/LanguageBsTest.php
tests/phpunit/languages/LanguageClassesTestCase.php
tests/phpunit/languages/LanguageCsTest.php
tests/phpunit/languages/LanguageCuTest.php
tests/phpunit/languages/LanguageCyTest.php
tests/phpunit/languages/LanguageDsbTest.php
tests/phpunit/languages/LanguageFrTest.php
tests/phpunit/languages/LanguageGaTest.php
tests/phpunit/languages/LanguageGdTest.php
tests/phpunit/languages/LanguageGvTest.php
tests/phpunit/languages/LanguageHeTest.php
tests/phpunit/languages/LanguageHiTest.php
tests/phpunit/languages/LanguageHrTest.php
tests/phpunit/languages/LanguageHsbTest.php
tests/phpunit/languages/LanguageHuTest.php
tests/phpunit/languages/LanguageHyTest.php
tests/phpunit/languages/LanguageKshTest.php
tests/phpunit/languages/LanguageLnTest.php
tests/phpunit/languages/LanguageLtTest.php
tests/phpunit/languages/LanguageLvTest.php
tests/phpunit/languages/LanguageMgTest.php
tests/phpunit/languages/LanguageMkTest.php
tests/phpunit/languages/LanguageMlTest.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/LanguageSeTest.php
tests/phpunit/languages/LanguageSgsTest.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/LanguageTest.php
tests/phpunit/languages/LanguageTiTest.php
tests/phpunit/languages/LanguageTlTest.php
tests/phpunit/languages/LanguageTrTest.php
tests/phpunit/languages/LanguageUkTest.php
tests/phpunit/languages/LanguageUzTest.php
tests/phpunit/languages/LanguageWaTest.php

index 16215c5..9723e1e 100644 (file)
@@ -10,12 +10,12 @@ class LanguageAmTest extends LanguageClassesTestCase {
 
        /** @dataProvider providePlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'other' );
+               $forms = array( 'one', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providePlural() {
-               return array (
+               return array(
                        array( 'one', 0 ),
                        array( 'one', 1 ),
                        array( 'other', 2 ),
index 17f7352..523ee7f 100644 (file)
@@ -44,13 +44,15 @@ class LanguageArTest extends LanguageClassesTestCase {
                        ),
                );
        }
+
        /** @dataProvider providePlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'zero', 'one', 'two', 'few', 'many', 'other' );
+               $forms = array( 'zero', 'one', 'two', 'few', 'many', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
+
        function providePlural() {
-               return array (
+               return array(
                        array( 'zero', 0 ),
                        array( 'one', 1 ),
                        array( 'two', 2 ),
index 06ee240..0144941 100644 (file)
@@ -10,12 +10,12 @@ class LanguageBeTest 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 ) );
        }
 
        function providePlural() {
-               return array (
+               return array(
                        array( 'one', 1 ),
                        array( 'many', 11 ),
                        array( 'one', 91 ),
index ad0ef43..5b246d8 100644 (file)
@@ -21,23 +21,26 @@ class LanguageBe_taraskTest extends LanguageClassesTestCase {
                        'bug 23156: U+2019 conversion to U+0027'
                );
        }
+
        /** see bug 23156 & r64981 */
        function testCommafy() {
                $this->assertEquals( '1,234,567', $this->getLang()->commafy( '1234567' ) );
-               $this->assertEquals(    '12,345', $this->getLang()->commafy(   '12345' ) );
+               $this->assertEquals( '12,345', $this->getLang()->commafy( '12345' ) );
        }
+
        /** see bug 23156 & r64981 */
        function testDoesNotCommafyFourDigitsNumber() {
-               $this->assertEquals(      '1234', $this->getLang()->commafy(    '1234' ) );
+               $this->assertEquals( '1234', $this->getLang()->commafy( '1234' ) );
        }
+
        /** @dataProvider providePluralFourForms */
        function testPluralFourForms( $result, $value ) {
-               $forms =  array( 'one', 'few', 'many', 'other' );
+               $forms = array( 'one', 'few', 'many', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providePluralFourForms() {
-               return array (
+               return array(
                        array( 'one', 1 ),
                        array( 'many', 11 ),
                        array( 'one', 91 ),
@@ -51,13 +54,15 @@ class LanguageBe_taraskTest extends LanguageClassesTestCase {
                        array( 'many', 120 ),
                );
        }
+
        /** @dataProvider providePluralTwoForms */
        function testPluralTwoForms( $result, $value ) {
-               $forms =  array( 'one', 'several' );
+               $forms = array( 'one', 'several' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
+
        function providePluralTwoForms() {
-               return array (
+               return array(
                        array( 'one', 1 ),
                        array( 'several', 11 ),
                        array( 'several', 91 ),
index 5bbd4fe..c364917 100644 (file)
@@ -10,12 +10,12 @@ class LanguageBhoTest extends LanguageClassesTestCase {
 
        /** @dataProvider providePlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'other' );
+               $forms = array( 'one', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providePlural() {
-               return array (
+               return array(
                        array( 'one', 0 ),
                        array( 'one', 1 ),
                        array( 'other', 2 ),
index dd00428..76d0070 100644 (file)
@@ -10,12 +10,12 @@ class LanguageBsTest 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 ) );
        }
 
        function providePlural() {
-               return array (
+               return array(
                        array( 'many', 0 ),
                        array( 'one', 1 ),
                        array( 'few', 2 ),
index 4f0a37f..6659dad 100644 (file)
@@ -32,7 +32,7 @@ abstract class LanguageClassesTestCase extends MediaWikiTestCase {
        /**
         * Regex used to find out the language code out of the class name
         * used by setUpBeforeClass
-       */
+        */
        private static $reExtractLangFromClass = '/Language(.*)Test/';
 
        /**
@@ -68,7 +68,7 @@ abstract class LanguageClassesTestCase extends MediaWikiTestCase {
                        $m[1] = 'en';
                        wfDebug(
                                __METHOD__ . " could not extract a language name "
-                               . "out of " . get_called_class() . " failling back to 'en'\n"
+                                       . "out of " . get_called_class() . " failling back to 'en'\n"
                        );
                }
                // TODO: validate $m[1] which should be a valid language code
index 72c9e79..884a129 100644 (file)
@@ -10,12 +10,12 @@ class LanguageCsTest extends LanguageClassesTestCase {
 
        /** @dataProvider providerPlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'few', 'other' );
+               $forms = array( 'one', 'few', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providerPlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'few', 2 ),
index 95f8da7..e2394b3 100644 (file)
@@ -10,12 +10,12 @@ class LanguageCuTest extends LanguageClassesTestCase {
 
        /** @dataProvider providerPlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'few', 'many', 'other' );
+               $forms = array( 'one', 'few', 'many', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providerPlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'few', 2 ),
index de6ba5c..2a7f4a9 100644 (file)
@@ -10,12 +10,12 @@ class LanguageCyTest extends LanguageClassesTestCase {
 
        /** @dataProvider providerPlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'zero', 'one', 'two', 'few', 'many', 'other' );
+               $forms = array( 'zero', 'one', 'two', 'few', 'many', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providerPlural() {
-               return array (
+               return array(
                        array( 'zero', 0 ),
                        array( 'one', 1 ),
                        array( 'two', 2 ),
index 8fb6024..285ce64 100644 (file)
@@ -10,12 +10,12 @@ class LanguageDsbTest 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 ) );
        }
 
        function providePlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'one', 101 ),
index 05de960..faf0de5 100644 (file)
@@ -10,12 +10,12 @@ class LanguageFrTest extends LanguageClassesTestCase {
 
        /** @dataProvider providePlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'other' );
+               $forms = array( 'one', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providePlural() {
-               return array (
+               return array(
                        array( 'one', 0 ),
                        array( 'one', 1 ),
                        array( 'other', 2 ),
index 0a54592..2dbb088 100644 (file)
@@ -10,12 +10,12 @@ class LanguageGaTest extends LanguageClassesTestCase {
 
        /** @dataProvider providerPlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'two', 'other' );
+               $forms = array( 'one', 'two', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providerPlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'two', 2 ),
index 7831cd2..409820f 100644 (file)
@@ -11,11 +11,12 @@ class LanguageGdTest extends LanguageClassesTestCase {
        /** @dataProvider providerPlural */
        function testPlural( $result, $value ) {
                // The CLDR ticket for this plural forms is not same as mw plural forms. See http://unicode.org/cldr/trac/ticket/2883
-               $forms =  array( 'Form 1', 'Form 2', 'Form 3', 'Form 4', 'Form 5', 'Form 6' );
+               $forms = array( 'Form 1', 'Form 2', 'Form 3', 'Form 4', 'Form 5', 'Form 6' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
+
        function providerPlural() {
-               return array (
+               return array(
                        array( 'Form 6', 0 ),
                        array( 'Form 1', 1 ),
                        array( 'Form 2', 2 ),
index 0edff59..4126e07 100644 (file)
@@ -11,11 +11,12 @@ class LanguageGvTest extends LanguageClassesTestCase {
        /** @dataProvider providerPlural */
        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
-               $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 ) );
        }
+
        function providerPlural() {
-               return array (
+               return array(
                        array( 'Form 4', 0 ),
                        array( 'Form 2', 1 ),
                        array( 'Form 3', 2 ),
index 575b277..6de88e5 100644 (file)
@@ -15,7 +15,7 @@ class LanguageHeTest extends LanguageClassesTestCase {
        }
 
        function providerPluralDual() {
-               return array (
+               return array(
                        array( 'other', 0 ), // Zero -> plural
                        array( 'one', 1 ), // Singular
                        array( 'two', 2 ), // Dual
@@ -30,7 +30,7 @@ class LanguageHeTest extends LanguageClassesTestCase {
        }
 
        function providerPlural() {
-               return array (
+               return array(
                        array( 'other', 0 ), // Zero -> plural
                        array( 'one', 1 ), // Singular
                        array( 'other', 2 ), // Plural, no dual provided
@@ -46,7 +46,7 @@ class LanguageHeTest extends LanguageClassesTestCase {
        // The comments in the beginning of the line help avoid RTL problems
        // with text editors.
        function providerGrammar() {
-               return array (
+               return array(
                        array(
                                /* result */ 'וויקיפדיה',
                                /* word   */ 'ויקיפדיה',
index 5a780a2..86d6af5 100644 (file)
@@ -10,12 +10,12 @@ class LanguageHiTest extends LanguageClassesTestCase {
 
        /** @dataProvider providePlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'other' );
+               $forms = array( 'one', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providePlural() {
-               return array (
+               return array(
                        array( 'one', 0 ),
                        array( 'one', 1 ),
                        array( 'other', 2 ),
index 748aaf4..9dce4ea 100644 (file)
@@ -10,12 +10,12 @@ class LanguageHrTest extends LanguageClassesTestCase {
 
        /** @dataProvider providerPlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'few', 'many', 'other' );
+               $forms = array( 'one', 'few', 'many', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providerPlural() {
-               return array (
+               return array(
                        array( 'many', 0 ),
                        array( 'one', 1 ),
                        array( 'few', 2 ),
index 2d90ef0..bec7d81 100644 (file)
@@ -10,12 +10,12 @@ class LanguageHsbTest 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 ) );
        }
 
        function providePlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'one', 101 ),
index e01278b..23d8e0c 100644 (file)
@@ -15,7 +15,7 @@ class LanguageHuTest extends LanguageClassesTestCase {
        }
 
        function providePlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'other', 2 ),
index 0ff04c3..7088d37 100644 (file)
@@ -10,12 +10,12 @@ class LanguageHyTest extends LanguageClassesTestCase {
 
        /** @dataProvider providerPlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'other' );
+               $forms = array( 'one', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providerPlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'other', 2 ),
index e92d264..9b4a53a 100644 (file)
@@ -10,12 +10,12 @@ class LanguageKshTest extends LanguageClassesTestCase {
 
        /** @dataProvider providerPlural */
        function testPlural( $result, $value ) {
-               $forms =  array(  'one', 'other', 'zero' );
+               $forms = array( 'one', 'other', 'zero' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providerPlural() {
-               return array (
+               return array(
                        array( 'zero', 0 ),
                        array( 'one', 1 ),
                        array( 'other', 2 ),
index 8853caa..669d8b0 100644 (file)
@@ -10,12 +10,12 @@ class LanguageLnTest extends LanguageClassesTestCase {
 
        /** @dataProvider providePlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'other' );
+               $forms = array( 'one', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providePlural() {
-               return array (
+               return array(
                        array( 'one', 0 ),
                        array( 'one', 1 ),
                        array( 'other', 2 ),
index 485a090..9d6428b 100644 (file)
@@ -10,18 +10,18 @@ class LanguageLtTest extends LanguageClassesTestCase {
 
        /** @dataProvider provideOneFewOtherCases */
        function testOneFewOtherPlural( $result, $value ) {
-               $forms =  array( 'one', 'few', 'other' );
+               $forms = array( 'one', 'few', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
-       
+
        /** @dataProvider provideOneFewCases */
        function testOneFewPlural( $result, $value ) {
-               $forms =  array( 'one', 'few' );
+               $forms = array( 'one', 'few' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function provideOneFewOtherCases() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'few', 2 ),
@@ -35,9 +35,9 @@ class LanguageLtTest extends LanguageClassesTestCase {
                        array( 'one', 40001 ),
                );
        }
-       
+
        function provideOneFewCases() {
-               return array (
+               return array(
                        array( 'one', 1 ),
                        array( 'few', 15 ),
                );
index bf4f793..efb6de6 100644 (file)
@@ -10,12 +10,12 @@ class LanguageLvTest extends LanguageClassesTestCase {
 
        /** @dataProvider providerPlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'other' );
+               $forms = array( 'one', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providerPlural() {
-               return array (
+               return array(
                        array( 'other', 0 ), #this must be zero form as per CLDR
                        array( 'one', 1 ),
                        array( 'other', 11 ),
index d6d3de9..c1e516b 100644 (file)
@@ -10,12 +10,12 @@ class LanguageMgTest extends LanguageClassesTestCase {
 
        /** @dataProvider providePlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'other' );
+               $forms = array( 'one', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providePlural() {
-               return array (
+               return array(
                        array( 'one', 0 ),
                        array( 'one', 1 ),
                        array( 'other', 2 ),
index 8cd84b8..5c241ba 100644 (file)
@@ -10,13 +10,13 @@ class LanguageMkTest extends LanguageClassesTestCase {
 
        /** @dataProvider providerPlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'other' );
+               $forms = array( 'one', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
 
        function providerPlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'other', 11 ),
index 10ff664..396114d 100644 (file)
@@ -9,17 +9,17 @@
 class LanguageMlTest extends LanguageClassesTestCase {
 
        /** see bug 29495 */
-       /** @dataProvider providerFormatNum*/
+       /** @dataProvider providerFormatNum */
        function testFormatNum( $result, $value ) {
                $this->assertEquals( $result, $this->getLang()->formatNum( $value ) );
        }
 
        function providerFormatNum() {
                return array(
-                       array( '12,34,567', '1234567'  ),
+                       array( '12,34,567', '1234567' ),
                        array( '12,345', '12345' ),
                        array( '1', '1' ),
-                       array( '123', '123' ) ,
+                       array( '123', '123' ),
                        array( '1,234', '1234' ),
                        array( '12,345.56', '12345.56' ),
                        array( '12,34,56,79,81,23,45,678', '12345679812345678' ),
@@ -27,7 +27,7 @@ class LanguageMlTest extends LanguageClassesTestCase {
                        array( '-12,00,000', '-1200000' ),
                        array( '-98', '-98' ),
                        array( '-98', -98 ),
-                       array( '-1,23,45,678',  -12345678 ),
+                       array( '-1,23,45,678', -12345678 ),
                        array( '', '' ),
                        array( '', null ),
                );
index 491d8ac..f7da1cd 100644 (file)
@@ -10,25 +10,25 @@ class LanguageMoTest extends LanguageClassesTestCase {
 
        /** @dataProvider providerPlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'few', 'other' );
+               $forms = array( 'one', 'few', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providerPlural() {
-               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 ),
-                       array( 'few',   101 ),
-                       array( 'few',   119 ),
+                       array( 'few', 101 ),
+                       array( 'few', 119 ),
                        array( 'other', 120 ),
                        array( 'other', 200 ),
-                       array( 'few',   201 ),
-                       array( 'few',   219 ),
+                       array( 'few', 201 ),
+                       array( 'few', 219 ),
                        array( 'other', 220 ),
                );
        }
index 70cd93a..f2b881e 100644 (file)
@@ -15,21 +15,21 @@ class LanguageMtTest extends LanguageClassesTestCase {
        }
 
        function providerPluralAllForms() {
-               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 ),
                        array( 'other', 101 ),
-                       array( 'few',   102 ),
-                       array( 'few',   110 ),
-                       array( 'many',  111 ),
-                       array( 'many',  119 ),
+                       array( 'few', 102 ),
+                       array( 'few', 110 ),
+                       array( 'many', 111 ),
+                       array( 'many', 119 ),
                        array( 'other', 120 ),
                        array( 'other', 201 ),
                );
@@ -42,23 +42,23 @@ class LanguageMtTest extends LanguageClassesTestCase {
        }
 
        function providerPluralTwoForms() {
-               return array (
-                       array( 'many',  0 ),
-                       array( 'one',   1 ),
-                       array( 'many',  2 ),
-                       array( 'many',  10 ),
-                       array( 'many',  11 ),
-                       array( 'many',  19 ),
-                       array( 'many',  20 ),
-                       array( 'many',  99 ),
-                       array( 'many',  100 ),
-                       array( 'many',  101 ),
-                       array( 'many',  102 ),
-                       array( 'many',  110 ),
-                       array( 'many',  111 ),
-                       array( 'many',  119 ),
-                       array( 'many',  120 ),
-                       array( 'many',  201 ),
+               return array(
+                       array( 'many', 0 ),
+                       array( 'one', 1 ),
+                       array( 'many', 2 ),
+                       array( 'many', 10 ),
+                       array( 'many', 11 ),
+                       array( 'many', 19 ),
+                       array( 'many', 20 ),
+                       array( 'many', 99 ),
+                       array( 'many', 100 ),
+                       array( 'many', 101 ),
+                       array( 'many', 102 ),
+                       array( 'many', 110 ),
+                       array( 'many', 111 ),
+                       array( 'many', 119 ),
+                       array( 'many', 120 ),
+                       array( 'many', 201 ),
                );
        }
 }
index 97146d3..9d80d13 100644 (file)
@@ -15,9 +15,9 @@ class LanguageNsoTest extends LanguageClassesTestCase {
        }
 
        function providerPlural() {
-               return array (
-                       array( 'one',  0 ),
-                       array( 'one',  1 ),
+               return array(
+                       array( 'one', 0 ),
+                       array( 'one', 1 ),
                        array( 'many', 2 ),
                );
        }
index 00b7e9e..1e36097 100644 (file)
@@ -15,23 +15,23 @@ class LanguagePlTest extends LanguageClassesTestCase {
        }
 
        function providerPluralFourForms() {
-               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 ),
                );
        }
 
@@ -42,23 +42,23 @@ class LanguagePlTest extends LanguageClassesTestCase {
        }
 
        function providerPlural() {
-               return array (
-                       array( 'many',  0 ),
-                       array( 'one',   1 ),
-                       array( 'many',  2 ),
-                       array( 'many',  3 ),
-                       array( 'many',  4 ),
-                       array( 'many',  5 ),
-                       array( 'many',  9 ),
-                       array( 'many',  10 ),
-                       array( 'many',  11 ),
-                       array( 'many',  21 ),
-                       array( 'many',  22 ),
-                       array( 'many',  23 ),
-                       array( 'many',  24 ),
-                       array( 'many',  25 ),
-                       array( 'many',  200 ),
-                       array( 'many',  201 ),
+               return array(
+                       array( 'many', 0 ),
+                       array( 'one', 1 ),
+                       array( 'many', 2 ),
+                       array( 'many', 3 ),
+                       array( 'many', 4 ),
+                       array( 'many', 5 ),
+                       array( 'many', 9 ),
+                       array( 'many', 10 ),
+                       array( 'many', 11 ),
+                       array( 'many', 21 ),
+                       array( 'many', 22 ),
+                       array( 'many', 23 ),
+                       array( 'many', 24 ),
+                       array( 'many', 25 ),
+                       array( 'many', 200 ),
+                       array( 'many', 201 ),
                );
        }
 }
index 61726bc..916ea45 100644 (file)
@@ -10,25 +10,25 @@ class LanguageRoTest extends LanguageClassesTestCase {
 
        /** @dataProvider providerPlural */
        function testPlural( $result, $value ) {
-               $forms =  array( 'one', 'few', 'other' );
+               $forms = array( 'one', 'few', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providerPlural() {
-               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 ),
-                       array( 'few',   101 ),
-                       array( 'few',   119 ),
+                       array( 'few', 101 ),
+                       array( 'few', 119 ),
                        array( 'other', 120 ),
                        array( 'other', 200 ),
-                       array( 'few',   201 ),
-                       array( 'few',   219 ),
+                       array( 'few', 201 ),
+                       array( 'few', 219 ),
                        array( 'other', 220 ),
                );
        }
index cf76353..c7dd802 100644 (file)
@@ -15,10 +15,10 @@ class LanguageSeTest extends LanguageClassesTestCase {
        }
 
        function providerPluralThreeForms() {
-               return array (
+               return array(
                        array( 'other', 0 ),
-                       array( 'one',   1 ),
-                       array( 'two',   2 ),
+                       array( 'one', 1 ),
+                       array( 'two', 2 ),
                        array( 'other', 3 ),
                );
        }
@@ -30,9 +30,9 @@ class LanguageSeTest extends LanguageClassesTestCase {
        }
 
        function providerPlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
-                       array( 'one',   1 ),
+                       array( 'one', 1 ),
                        array( 'other', 2 ),
                        array( 'other', 3 ),
                );
index e2a56ca..8a6e979 100644 (file)
@@ -15,33 +15,33 @@ class LanguageSgsTest extends LanguageClassesTestCase {
        }
 
        function providePluralAllForms() {
-               return array (
-                       array( 'many',  0 ),
-                       array( 'one',   1 ),
-                       array( 'few',   2 ),
+               return array(
+                       array( 'many', 0 ),
+                       array( 'one', 1 ),
+                       array( 'few', 2 ),
                        array( 'other', 3 ),
-                       array( 'many',  10 ),
-                       array( 'many',  11 ),
-                       array( 'many',  12 ),
-                       array( 'many',  19 ),
+                       array( 'many', 10 ),
+                       array( 'many', 11 ),
+                       array( 'many', 12 ),
+                       array( 'many', 19 ),
                        array( 'other', 20 ),
-                       array( 'many',  100 ),
-                       array( 'one',   101 ),
-                       array( 'many',  111 ),
-                       array( 'many',  112 ),
+                       array( 'many', 100 ),
+                       array( 'one', 101 ),
+                       array( 'many', 111 ),
+                       array( 'many', 112 ),
                );
        }
 
        /** @dataProvider providePluralTwoForms */
        function testPluralTwoForms( $result, $value ) {
-               $forms =  array( 'one', 'other' );
+               $forms = array( 'one', 'other' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
 
        function providePluralTwoForms() {
-               return array (
+               return array(
                        array( 'other', 0 ),
-                       array( 'one',   1 ),
+                       array( 'one', 1 ),
                        array( 'other', 2 ),
                        array( 'other', 3 ),
                        array( 'other', 10 ),
@@ -50,7 +50,7 @@ class LanguageSgsTest extends LanguageClassesTestCase {
                        array( 'other', 19 ),
                        array( 'other', 20 ),
                        array( 'other', 100 ),
-                       array( 'one',   101 ),
+                       array( 'one', 101 ),
                        array( 'other', 111 ),
                        array( 'other', 112 ),
                );
index 25618c4..282fd2f 100644 (file)
@@ -15,9 +15,9 @@ class LanguageShTest extends LanguageClassesTestCase {
        }
 
        function providerPlural() {
-               return array (
+               return array(
                        array( 'many', 0 ),
-                       array( 'one',  1 ),
+                       array( 'one', 1 ),
                        array( 'many', 2 ),
                );
        }
index b50f7df..89cbbf0 100644 (file)
@@ -16,7 +16,7 @@ class LanguageSkTest extends LanguageClassesTestCase {
        }
 
        function providerPlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'few', 2 ),
index bfb7c7e..075e6af 100644 (file)
@@ -16,19 +16,19 @@ class LanguageSlTest extends LanguageClassesTestCase {
        }
 
        function providerPlural() {
-               return array (
-                       array( 'zero',  0 ),
-                       array( 'one',   1 ),
-                       array( 'two',   2 ),
-                       array( 'few',   3 ),
-                       array( 'few',   4 ),
+               return array(
+                       array( 'zero', 0 ),
+                       array( 'one', 1 ),
+                       array( 'two', 2 ),
+                       array( 'few', 3 ),
+                       array( 'few', 4 ),
                        array( 'other', 5 ),
                        array( 'other', 99 ),
                        array( 'other', 100 ),
-                       array( 'one',   101 ),
-                       array( 'two',   102 ),
-                       array( 'few',   103 ),
-                       array( 'one',   201 ),
+                       array( 'one', 101 ),
+                       array( 'two', 102 ),
+                       array( 'few', 103 ),
+                       array( 'one', 201 ),
                );
        }
 }
index 85fa9fb..6d65521 100644 (file)
@@ -15,10 +15,10 @@ class LanguageSmaTest extends LanguageClassesTestCase {
        }
 
        function providerPluralThreeForms() {
-               return array (
+               return array(
                        array( 'other', 0 ),
-                       array( 'one',   1 ),
-                       array( 'two',   2 ),
+                       array( 'one', 1 ),
+                       array( 'two', 2 ),
                        array( 'other', 3 ),
                );
        }
@@ -30,9 +30,9 @@ class LanguageSmaTest extends LanguageClassesTestCase {
        }
 
        function providerPlural() {
-               return array (
+               return array(
                        array( 'other', 0 ),
-                       array( 'one',   1 ),
+                       array( 'one', 1 ),
                        array( 'other', 2 ),
                        array( 'other', 3 ),
                );
index c88115d..5611030 100644 (file)
@@ -19,7 +19,7 @@ class LanguageSrTest extends LanguageClassesTestCase {
 
        ##### TESTS #######################################################
 
-       function testEasyConversions( ) {
+       function testEasyConversions() {
                $this->assertCyrillic(
                        'шђчћжШЂЧЋЖ',
                        'Cyrillic guessing characters'
@@ -120,7 +120,7 @@ class LanguageSrTest extends LanguageClassesTestCase {
        }
 
        function providePluralFourForms() {
-               return array (
+               return array(
                        array( 'one', 1 ),
                        array( 'many', 11 ),
                        array( 'one', 91 ),
@@ -134,13 +134,15 @@ class LanguageSrTest extends LanguageClassesTestCase {
                        array( 'many', 120 ),
                );
        }
+
        /** @dataProvider providePluralTwoForms */
        function testPluralTwoForms( $result, $value ) {
                $forms = array( 'one', 'several' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
+
        function providePluralTwoForms() {
-               return array (
+               return array(
                        array( 'one', 1 ),
                        array( 'several', 11 ),
                        array( 'several', 91 ),
@@ -162,6 +164,7 @@ class LanguageSrTest extends LanguageClassesTestCase {
                        $msg
                );
        }
+
        /**
         * Wrapper to verify a text is different once converted to a variant.
         * @param $text string Text to convert
@@ -185,6 +188,7 @@ class LanguageSrTest extends LanguageClassesTestCase {
                $this->assertUnConverted( $text, 'sr-ec', $msg );
                $this->assertConverted( $text, 'sr-el', $msg );
        }
+
        /**
         * Verifiy the given Latin text is not converted when using
         * using the Latin variant and converted to Cyrillic when using
@@ -201,12 +205,14 @@ class LanguageSrTest extends LanguageClassesTestCase {
                return $this->getLang()
                        ->mConverter
                        ->convertTo(
-                               $text, $variant
-                       );
+                       $text, $variant
+               );
        }
+
        function convertToCyrillic( $text ) {
                return $this->convertTo( $text, 'sr-ec' );
        }
+
        function convertToLatin( $text ) {
                return $this->convertTo( $text, 'sr-el' );
        }
index 9507714..8b0b14b 100644 (file)
@@ -439,10 +439,10 @@ class LanguageTest extends LanguageClassesTestCase {
 
        function provideLanguageCodes() {
                return array(
-                       array( 'fr'       , 'Two letters, minor case' ),
-                       array( 'EN'       , 'Two letters, upper case' ),
-                       array( 'tyv'      , 'Three letters' ),
-                       array( 'tokipona'   , 'long language code' ),
+                       array( 'fr', 'Two letters, minor case' ),
+                       array( 'EN', 'Two letters, upper case' ),
+                       array( 'tyv', 'Three letters' ),
+                       array( 'tokipona', 'long language code' ),
                        array( 'be-tarask', 'With dash' ),
                        array( 'Zh-classical', 'Begin with upper case, dash' ),
                        array( 'Be-x-old', 'With extension (two dashes)' ),
@@ -455,7 +455,7 @@ class LanguageTest extends LanguageClassesTestCase {
         */
        function testKnownLanguageTag( $code, $message = '' ) {
                $this->assertTrue(
-                       (bool) Language::isKnownLanguageTag( $code ),
+                       (bool)Language::isKnownLanguageTag( $code ),
                        "validating code $code - $message"
                );
        }
@@ -477,7 +477,7 @@ class LanguageTest extends LanguageClassesTestCase {
                }
 
                $this->assertTrue(
-                       (bool) Language::isKnownLanguageTag( 'pal' ),
+                       (bool)Language::isKnownLanguageTag( 'pal' ),
                        'validating code "pal" an ancient language, which probably will not appear in Names.php, but appears in CLDR in English'
                );
        }
@@ -488,7 +488,7 @@ class LanguageTest extends LanguageClassesTestCase {
         */
        function testUnknownLanguageTag( $code, $message = '' ) {
                $this->assertFalse(
-                       (bool) Language::isKnownLanguageTag( $code ),
+                       (bool)Language::isKnownLanguageTag( $code ),
                        "checking that code $code is invalid - $message"
                );
        }
@@ -509,6 +509,7 @@ class LanguageTest extends LanguageClassesTestCase {
                        "sprintfDate('$format', '$ts'): $msg"
                );
        }
+
        /**
         * bug 33454. sprintfDate should always use UTC.
         * @dataProvider provideSprintfDateSamples
@@ -958,7 +959,6 @@ class LanguageTest extends LanguageClassesTestCase {
        }
 
 
-
        /**
         * @dataProvider provideFormatDuration
         */
@@ -1101,13 +1101,13 @@ class LanguageTest extends LanguageClassesTestCase {
        function testCheckTitleEncoding( $s ) {
                $this->assertEquals(
                        $s,
-                       $this->getLang()->checkTitleEncoding($s),
+                       $this->getLang()->checkTitleEncoding( $s ),
                        "checkTitleEncoding('$s')"
                );
        }
 
        function provideCheckTitleEncodingData() {
-               return array (
+               return array(
                        array( "" ),
                        array( "United States of America" ), // 7bit ASCII
                        array( rawurldecode( "S%C3%A9rie%20t%C3%A9l%C3%A9vis%C3%A9e" ) ),
@@ -1212,7 +1212,7 @@ class LanguageTest extends LanguageClassesTestCase {
                        array( 7000, 'MMMMMMM' ),
                        array( 8000, 'MMMMMMMM' ),
                        array( 9000, 'MMMMMMMMM' ),
-                       array( 9999, 'MMMMMMMMMCMXCIX'),
+                       array( 9999, 'MMMMMMMMMCMXCIX' ),
                        array( 10000, 'MMMMMMMMMM' ),
                );
        }
@@ -1311,7 +1311,7 @@ class LanguageTest extends LanguageClassesTestCase {
                $s = $lang->getMessageFromDB( 'word-separator' );
                $c = $lang->getMessageFromDB( 'comma-separator' );
 
-               $this->assertEquals( '', $lang->listToText( array( ) ) );
+               $this->assertEquals( '', $lang->listToText( array() ) );
                $this->assertEquals( 'a', $lang->listToText( array( 'a' ) ) );
                $this->assertEquals( "a{$and}{$s}b", $lang->listToText( array( 'a', 'b' ) ) );
                $this->assertEquals( "a{$c}b{$and}{$s}c", $lang->listToText( array( 'a', 'b', 'c' ) ) );
index 259e007..8af0eee 100644 (file)
@@ -15,9 +15,9 @@ class LanguageTiTest extends LanguageClassesTestCase {
        }
 
        function providerPlural() {
-               return array (
-                       array( 'one',  0 ),
-                       array( 'one',  1 ),
+               return array(
+                       array( 'one', 0 ),
+                       array( 'one', 1 ),
                        array( 'many', 2 ),
                );
        }
index bf3dafc..abd8581 100644 (file)
@@ -15,9 +15,9 @@ class LanguageTlTest extends LanguageClassesTestCase {
        }
 
        function providerPlural() {
-               return array (
-                       array( 'one',  0 ),
-                       array( 'one',  1 ),
+               return array(
+                       array( 'one', 0 ),
+                       array( 'one', 1 ),
                        array( 'many', 2 ),
                );
        }
index e4859df..e93d49d 100644 (file)
@@ -18,9 +18,9 @@ class LanguageTrTest extends LanguageClassesTestCase {
         * @dataProvider provideDottedAndDotlessI
         */
        function testDottedAndDotlessI( $func, $input, $inputCase, $expected ) {
-               if( $func == 'ucfirst' ) {
+               if ( $func == 'ucfirst' ) {
                        $res = $this->getLang()->ucfirst( $input );
-               } elseif( $func == 'lcfirst' ) {
+               } elseif ( $func == 'lcfirst' ) {
                        $res = $this->getLang()->lcfirst( $input );
                } else {
                        throw new MWException( __METHOD__ . " given an invalid function name '$func'" );
index f29b90b..9bbfaf6 100644 (file)
@@ -16,7 +16,7 @@ class LanguageUkTest extends LanguageClassesTestCase {
        }
 
        function providePluralFourForms() {
-               return array (
+               return array(
                        array( 'one', 1 ),
                        array( 'many', 11 ),
                        array( 'one', 91 ),
@@ -30,13 +30,15 @@ class LanguageUkTest extends LanguageClassesTestCase {
                        array( 'many', 120 ),
                );
        }
+
        /** @dataProvider providePluralTwoForms */
        function testPluralTwoForms( $result, $value ) {
                $forms = array( 'one', 'several' );
                $this->assertEquals( $result, $this->getLang()->convertPlural( $value, $forms ) );
        }
+
        function providePluralTwoForms() {
-               return array (
+               return array(
                        array( 'one', 1 ),
                        array( 'several', 11 ),
                        array( 'several', 91 ),
index 99607d1..495c0be 100644 (file)
@@ -64,6 +64,7 @@ class LanguageUzTest extends LanguageClassesTestCase {
                        $msg
                );
        }
+
        /**
         * Wrapper to verify a text is different once converted to a variant.
         * @param $text string Text to convert
@@ -87,6 +88,7 @@ class LanguageUzTest extends LanguageClassesTestCase {
                $this->assertUnConverted( $text, 'uz-cyrl', $msg );
                $this->assertConverted( $text, 'uz-latn', $msg );
        }
+
        /**
         * Verifiy the given Latin text is not converted when using
         * using the Latin variant and converted to Cyrillic when using
@@ -102,9 +104,11 @@ class LanguageUzTest extends LanguageClassesTestCase {
        function convertTo( $text, $variant ) {
                return $this->getLang()->mConverter->convertTo( $text, $variant );
        }
+
        function convertToCyrillic( $text ) {
                return $this->convertTo( $text, 'uz-cyrl' );
        }
+
        function convertToLatin( $text ) {
                return $this->convertTo( $text, 'uz-latn' );
        }
index 4a1c0e7..28329fa 100644 (file)
@@ -15,9 +15,9 @@ class LanguageWaTest extends LanguageClassesTestCase {
        }
 
        function providerPlural() {
-               return array (
-                       array( 'one',  0 ),
-                       array( 'one',  1 ),
+               return array(
+                       array( 'one', 0 ),
+                       array( 'one', 1 ),
                        array( 'many', 2 ),
                );
        }