Use more short array syntax in comments (/tests/)
authorumherirrender <umherirrender_de.wp@web.de>
Sun, 10 Jul 2016 15:23:29 +0000 (17:23 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Sun, 10 Jul 2016 15:23:29 +0000 (17:23 +0200)
Change-Id: I86c73cb9447ac562a73348b4030e24ebf49a90dc

13 files changed:
tests/phpunit/includes/GlobalFunctions/GlobalTest.php
tests/phpunit/includes/GlobalFunctions/wfBCP47Test.php
tests/phpunit/includes/GlobalFunctions/wfUrlencodeTest.php
tests/phpunit/includes/HttpTest.php
tests/phpunit/includes/MWNamespaceTest.php
tests/phpunit/includes/MWTimestampTest.php
tests/phpunit/includes/SanitizerTest.php
tests/phpunit/includes/content/CssContentTest.php
tests/phpunit/includes/filebackend/FileBackendTest.php
tests/phpunit/includes/installer/DatabaseUpdaterTest.php
tests/phpunit/includes/registration/CoreVersionCheckerTest.php
tests/phpunit/includes/specials/SpecialSearchTest.php
tests/phpunit/includes/title/MediaWikiTitleCodecTest.php

index 9f2fdfe..1d48d08 100644 (file)
@@ -413,8 +413,8 @@ class GlobalTest extends MediaWikiTestCase {
                );
        }
 
-       /** array( shorthand, expected integer ) */
        public static function provideShorthand() {
+               // Syntax: [ shorthand, expected integer ]
                return [
                        # Null, empty ...
                        [ '', -1 ],
index 082fe22..c76666d 100644 (file)
@@ -97,7 +97,7 @@ class WfBCP47Test extends MediaWikiTestCase {
                         *  az-Arab-x-AZE-derbend
                         * AZE being private, it should be lower case, hence the test above
                         * should probably be:
-                        *  array( 'az-arab-x-aze-derbend', 'az-Arab-x-AZE-derbend' ),
+                        * [ 'az-arab-x-aze-derbend', 'az-Arab-x-AZE-derbend' ],
                         */
 
                        # Private use registry values:
index 1f1c9be..cbe2e2f 100644 (file)
@@ -80,12 +80,12 @@ class WfUrlencodeTest extends MediaWikiTestCase {
 
        /**
         * Format is either:
-        *   array( 'input', 'expected' );
+        *   [ 'input', 'expected' ];
         * Or:
-        *   array( 'input',
-        *       array( 'Apache', 'expected' ),
-        *       array( 'Microsoft-IIS/7', 'expected' ),
-        *    ),
+        *   [ 'input',
+        *       [ 'Apache', 'expected' ],
+        *       [ 'Microsoft-IIS/7', 'expected' ],
+        *   ],
         * If you want to add other HTTP server name, you will have to add a new
         * testing method much like the testEncodingUrlWith() method above.
         */
index 4c2e02b..ae0b4be 100644 (file)
@@ -106,8 +106,8 @@ class HttpTest extends MediaWikiTestCase {
                        # (\S+) - host part is made of anything not whitespaces
                        // commented these out in order to remove @group Broken
                        // @todo are these valid tests? if so, fix Http::isValidURI so it can handle them
-                       // array( false, 'http://!"èèè¿¿¿~~\'', 'hostname is made of any non whitespace' ),
-                       // array( false, 'http://exam:ple.org/', 'hostname can not use colons!' ),
+                       // [ false, 'http://!"èèè¿¿¿~~\'', 'hostname is made of any non whitespace' ],
+                       // [ false, 'http://exam:ple.org/', 'hostname can not use colons!' ],
 
                        # (:[0-9]+)? - port number
                        [ true, 'http://example.org:80/' ],
@@ -212,11 +212,11 @@ class HttpTest extends MediaWikiTestCase {
                        [ 'CURLAUTH_DIGEST' ],
                        [ 'CURLAUTH_GSSNEGOTIATE' ],
                        [ 'CURLAUTH_NTLM' ],
-                       // array( 'CURLCLOSEPOLICY_CALLBACK' ), // removed in PHP 5.6.0
-                       // array( 'CURLCLOSEPOLICY_LEAST_RECENTLY_USED' ), // removed in PHP 5.6.0
-                       // array( 'CURLCLOSEPOLICY_LEAST_TRAFFIC' ), // removed in PHP 5.6.0
-                       // array( 'CURLCLOSEPOLICY_OLDEST' ), // removed in PHP 5.6.0
-                       // array( 'CURLCLOSEPOLICY_SLOWEST' ), // removed in PHP 5.6.0
+                       // [ 'CURLCLOSEPOLICY_CALLBACK' ], // removed in PHP 5.6.0
+                       // [ 'CURLCLOSEPOLICY_LEAST_RECENTLY_USED' ], // removed in PHP 5.6.0
+                       // [ 'CURLCLOSEPOLICY_LEAST_TRAFFIC' ], // removed in PHP 5.6.0
+                       // [ 'CURLCLOSEPOLICY_OLDEST' ], // removed in PHP 5.6.0
+                       // [ 'CURLCLOSEPOLICY_SLOWEST' ], // removed in PHP 5.6.0
                        [ 'CURLE_ABORTED_BY_CALLBACK' ],
                        [ 'CURLE_BAD_CALLING_ORDER' ],
                        [ 'CURLE_BAD_CONTENT_ENCODING' ],
@@ -268,7 +268,7 @@ class HttpTest extends MediaWikiTestCase {
                        [ 'CURLE_RECV_ERROR' ],
                        [ 'CURLE_SEND_ERROR' ],
                        [ 'CURLE_SHARE_IN_USE' ],
-                       // array( 'CURLE_SSH' ), // not present in HHVM 3.3.0-dev
+                       // [ 'CURLE_SSH' ], // not present in HHVM 3.3.0-dev
                        [ 'CURLE_SSL_CACERT' ],
                        [ 'CURLE_SSL_CERTPROBLEM' ],
                        [ 'CURLE_SSL_CIPHER' ],
@@ -286,14 +286,14 @@ class HttpTest extends MediaWikiTestCase {
                        [ 'CURLFTPAUTH_DEFAULT' ],
                        [ 'CURLFTPAUTH_SSL' ],
                        [ 'CURLFTPAUTH_TLS' ],
-                       // array( 'CURLFTPMETHOD_MULTICWD' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLFTPMETHOD_NOCWD' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLFTPMETHOD_SINGLECWD' ), // not present in HHVM 3.3.0-dev
+                       // [ 'CURLFTPMETHOD_MULTICWD' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLFTPMETHOD_NOCWD' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLFTPMETHOD_SINGLECWD' ], // not present in HHVM 3.3.0-dev
                        [ 'CURLFTPSSL_ALL' ],
                        [ 'CURLFTPSSL_CONTROL' ],
                        [ 'CURLFTPSSL_NONE' ],
                        [ 'CURLFTPSSL_TRY' ],
-                       // array( 'CURLINFO_CERTINFO' ), // not present in HHVM 3.3.0-dev
+                       // [ 'CURLINFO_CERTINFO' ], // not present in HHVM 3.3.0-dev
                        [ 'CURLINFO_CONNECT_TIME' ],
                        [ 'CURLINFO_CONTENT_LENGTH_DOWNLOAD' ],
                        [ 'CURLINFO_CONTENT_LENGTH_UPLOAD' ],
@@ -308,7 +308,7 @@ class HttpTest extends MediaWikiTestCase {
                        [ 'CURLINFO_PRIVATE' ],
                        [ 'CURLINFO_REDIRECT_COUNT' ],
                        [ 'CURLINFO_REDIRECT_TIME' ],
-                       // array( 'CURLINFO_REDIRECT_URL' ), // not present in HHVM 3.3.0-dev
+                       // [ 'CURLINFO_REDIRECT_URL' ], // not present in HHVM 3.3.0-dev
                        [ 'CURLINFO_REQUEST_SIZE' ],
                        [ 'CURLINFO_SIZE_DOWNLOAD' ],
                        [ 'CURLINFO_SIZE_UPLOAD' ],
@@ -329,8 +329,8 @@ class HttpTest extends MediaWikiTestCase {
                        [ 'CURLOPT_BUFFERSIZE' ],
                        [ 'CURLOPT_CAINFO' ],
                        [ 'CURLOPT_CAPATH' ],
-                       // array( 'CURLOPT_CERTINFO' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLOPT_CLOSEPOLICY' ), // removed in PHP 5.6.0
+                       // [ 'CURLOPT_CERTINFO' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLOPT_CLOSEPOLICY' ], // removed in PHP 5.6.0
                        [ 'CURLOPT_CONNECTTIMEOUT' ],
                        [ 'CURLOPT_CONNECTTIMEOUT_MS' ],
                        [ 'CURLOPT_COOKIE' ],
@@ -354,8 +354,8 @@ class HttpTest extends MediaWikiTestCase {
                        [ 'CURLOPT_FTPPORT' ],
                        [ 'CURLOPT_FTPSSLAUTH' ],
                        [ 'CURLOPT_FTP_CREATE_MISSING_DIRS' ],
-                       // array( 'CURLOPT_FTP_FILEMETHOD' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLOPT_FTP_SKIP_PASV_IP' ), // not present in HHVM 3.3.0-dev
+                       // [ 'CURLOPT_FTP_FILEMETHOD' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLOPT_FTP_SKIP_PASV_IP' ], // not present in HHVM 3.3.0-dev
                        [ 'CURLOPT_FTP_SSL' ],
                        [ 'CURLOPT_FTP_USE_EPRT' ],
                        [ 'CURLOPT_FTP_USE_EPSV' ],
@@ -371,14 +371,14 @@ class HttpTest extends MediaWikiTestCase {
                        [ 'CURLOPT_INFILESIZE' ],
                        [ 'CURLOPT_INTERFACE' ],
                        [ 'CURLOPT_IPRESOLVE' ],
-                       // array( 'CURLOPT_KEYPASSWD' ), // not present in HHVM 3.3.0-dev
+                       // [ 'CURLOPT_KEYPASSWD' ], // not present in HHVM 3.3.0-dev
                        [ 'CURLOPT_KRB4LEVEL' ],
                        [ 'CURLOPT_LOW_SPEED_LIMIT' ],
                        [ 'CURLOPT_LOW_SPEED_TIME' ],
                        [ 'CURLOPT_MAXCONNECTS' ],
                        [ 'CURLOPT_MAXREDIRS' ],
-                       // array( 'CURLOPT_MAX_RECV_SPEED_LARGE' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLOPT_MAX_SEND_SPEED_LARGE' ), // not present in HHVM 3.3.0-dev
+                       // [ 'CURLOPT_MAX_RECV_SPEED_LARGE' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLOPT_MAX_SEND_SPEED_LARGE' ], // not present in HHVM 3.3.0-dev
                        [ 'CURLOPT_NETRC' ],
                        [ 'CURLOPT_NOBODY' ],
                        [ 'CURLOPT_NOPROGRESS' ],
@@ -390,7 +390,7 @@ class HttpTest extends MediaWikiTestCase {
                        [ 'CURLOPT_POSTREDIR' ],
                        [ 'CURLOPT_PRIVATE' ],
                        [ 'CURLOPT_PROGRESSFUNCTION' ],
-                       // array( 'CURLOPT_PROTOCOLS' ), // not present in HHVM 3.3.0-dev
+                       // [ 'CURLOPT_PROTOCOLS' ], // not present in HHVM 3.3.0-dev
                        [ 'CURLOPT_PROXY' ],
                        [ 'CURLOPT_PROXYAUTH' ],
                        [ 'CURLOPT_PROXYPORT' ],
@@ -402,14 +402,14 @@ class HttpTest extends MediaWikiTestCase {
                        [ 'CURLOPT_RANGE' ],
                        [ 'CURLOPT_READDATA' ],
                        [ 'CURLOPT_READFUNCTION' ],
-                       // array( 'CURLOPT_REDIR_PROTOCOLS' ), // not present in HHVM 3.3.0-dev
+                       // [ 'CURLOPT_REDIR_PROTOCOLS' ], // not present in HHVM 3.3.0-dev
                        [ 'CURLOPT_REFERER' ],
                        [ 'CURLOPT_RESUME_FROM' ],
                        [ 'CURLOPT_RETURNTRANSFER' ],
-                       // array( 'CURLOPT_SSH_AUTH_TYPES' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLOPT_SSH_HOST_PUBLIC_KEY_MD5' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLOPT_SSH_PRIVATE_KEYFILE' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLOPT_SSH_PUBLIC_KEYFILE' ), // not present in HHVM 3.3.0-dev
+                       // [ 'CURLOPT_SSH_AUTH_TYPES' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLOPT_SSH_HOST_PUBLIC_KEY_MD5' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLOPT_SSH_PRIVATE_KEYFILE' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLOPT_SSH_PUBLIC_KEYFILE' ], // not present in HHVM 3.3.0-dev
                        [ 'CURLOPT_SSLCERT' ],
                        [ 'CURLOPT_SSLCERTPASSWD' ],
                        [ 'CURLOPT_SSLCERTTYPE' ],
@@ -437,28 +437,28 @@ class HttpTest extends MediaWikiTestCase {
                        [ 'CURLOPT_VERBOSE' ],
                        [ 'CURLOPT_WRITEFUNCTION' ],
                        [ 'CURLOPT_WRITEHEADER' ],
-                       // array( 'CURLPROTO_ALL' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLPROTO_DICT' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLPROTO_FILE' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLPROTO_FTP' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLPROTO_FTPS' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLPROTO_HTTP' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLPROTO_HTTPS' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLPROTO_LDAP' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLPROTO_LDAPS' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLPROTO_SCP' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLPROTO_SFTP' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLPROTO_TELNET' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLPROTO_TFTP' ), // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_ALL' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_DICT' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_FILE' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_FTP' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_FTPS' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_HTTP' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_HTTPS' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_LDAP' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_LDAPS' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_SCP' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_SFTP' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_TELNET' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_TFTP' ], // not present in HHVM 3.3.0-dev
                        [ 'CURLPROXY_HTTP' ],
-                       // array( 'CURLPROXY_SOCKS4' ), // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROXY_SOCKS4' ], // not present in HHVM 3.3.0-dev
                        [ 'CURLPROXY_SOCKS5' ],
-                       // array( 'CURLSSH_AUTH_DEFAULT' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLSSH_AUTH_HOST' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLSSH_AUTH_KEYBOARD' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLSSH_AUTH_NONE' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLSSH_AUTH_PASSWORD' ), // not present in HHVM 3.3.0-dev
-                       // array( 'CURLSSH_AUTH_PUBLICKEY' ), // not present in HHVM 3.3.0-dev
+                       // [ 'CURLSSH_AUTH_DEFAULT' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLSSH_AUTH_HOST' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLSSH_AUTH_KEYBOARD' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLSSH_AUTH_NONE' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLSSH_AUTH_PASSWORD' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLSSH_AUTH_PUBLICKEY' ], // not present in HHVM 3.3.0-dev
                        [ 'CURLVERSION_NOW' ],
                        [ 'CURL_HTTP_VERSION_1_0' ],
                        [ 'CURL_HTTP_VERSION_1_1' ],
index ca01aef..24db445 100644 (file)
@@ -387,7 +387,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
                $wgContentNamespaces = 5;
                $this->assertEquals( [ NS_MAIN ], MWNamespace::getContentNamespaces() );
 
-               # test $wgContentNamespaces === array()
+               # test $wgContentNamespaces === []
                $wgContentNamespaces = [];
                $this->assertEquals( [ NS_MAIN ], MWNamespace::getContentNamespaces() );
 
@@ -474,7 +474,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
         * global $wgCapitalLink setting to have extended coverage.
         *
         * MWNamespace::isCapitalized() rely on two global settings:
-        *   $wgCapitalLinkOverrides = array(); by default
+        *   $wgCapitalLinkOverrides = []; by default
         *   $wgCapitalLinks = true; by default
         * This function test $wgCapitalLinks
         *
index bca3982..70e4aea 100644 (file)
@@ -102,7 +102,7 @@ class MWTimestampTest extends MediaWikiLangTestCase {
 
        /**
         * Returns a list of valid timestamps in the format:
-        * array( type, timestamp_of_type, timestamp_in_MW )
+        * [ type, timestamp_of_type, timestamp_in_MW ]
         */
        public static function provideValidTimestamps() {
                return [
@@ -124,7 +124,7 @@ class MWTimestampTest extends MediaWikiLangTestCase {
 
        /**
         * Returns a list of out of range timestamps in the format:
-        * array( type, timestamp_of_type )
+        * [ type, timestamp_of_type ]
         */
        public static function provideOutOfRangeTimestamps() {
                return [
index 72d7166..26529e8 100644 (file)
@@ -248,7 +248,7 @@ class SanitizerTest extends MediaWikiTestCase {
        }
 
        public static function provideDeprecatedAttributes() {
-               /** array( <attribute>, <element>, [message] ) */
+               /** [ <attribute>, <element>, [message] ] */
                return [
                        [ 'clear="left"', 'br' ],
                        [ 'clear="all"', 'br' ],
@@ -276,7 +276,7 @@ class SanitizerTest extends MediaWikiTestCase {
        }
 
        public static function provideCssCommentsFixtures() {
-               /** array( <expected>, <css>, [message] ) */
+               /** [ <expected>, <css>, [message] ] */
                return [
                        // Valid comments spanning entire input
                        [ '/**/', '/**/' ],
@@ -353,7 +353,7 @@ class SanitizerTest extends MediaWikiTestCase {
        }
 
        public static function provideEscapeIdReferenceList() {
-               /** array( <reference list>, <individual id 1>, <individual id 2> ) */
+               /** [ <reference list>, <individual id 1>, <individual id 2> ] */
                return [
                        [ 'foo bar', 'foo', 'bar' ],
                        [ '#1 #2', '#1', '#2' ],
index a2aef35..d2078d7 100644 (file)
@@ -101,15 +101,15 @@ class CssContentTest extends JavaScriptContentTest {
         */
        public static function provideGetRedirectTarget() {
                // @codingStandardsIgnoreStart Generic.Files.LineLength
-               return array(
-                       array( 'MediaWiki:MonoBook.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=MediaWiki:MonoBook.css&action=raw&ctype=text/css);" ),
-                       array( 'User:FooBar/common.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=User:FooBar/common.css&action=raw&ctype=text/css);" ),
-                       array( 'Gadget:FooBaz.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=Gadget:FooBaz.css&action=raw&ctype=text/css);" ),
+               return [
+                       [ 'MediaWiki:MonoBook.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=MediaWiki:MonoBook.css&action=raw&ctype=text/css);" ],
+                       [ 'User:FooBar/common.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=User:FooBar/common.css&action=raw&ctype=text/css);" ],
+                       [ 'Gadget:FooBaz.css', "/* #REDIRECT */@import url(//example.org/w/index.php?title=Gadget:FooBaz.css&action=raw&ctype=text/css);" ],
                        # No #REDIRECT comment
-                       array( null, "@import url(//example.org/w/index.php?title=Gadget:FooBaz.css&action=raw&ctype=text/css);" ),
+                       [ null, "@import url(//example.org/w/index.php?title=Gadget:FooBaz.css&action=raw&ctype=text/css);" ],
                        # Wrong domain
-                       array( null, "/* #REDIRECT */@import url(//example.com/w/index.php?title=Gadget:FooBaz.css&action=raw&ctype=text/css);" ),
-               );
+                       [ null, "/* #REDIRECT */@import url(//example.com/w/index.php?title=Gadget:FooBaz.css&action=raw&ctype=text/css);" ],
+               ];
                // @codingStandardsIgnoreEnd
        }
 
index 4aeddc6..af5d3ac 100644 (file)
@@ -1516,7 +1516,7 @@ class FileBackendTest extends MediaWikiTestCase {
                        [ "$base/unittest-cont1/e/a/z/some_file1.txt", true ],
                        [ "$base/unittest-cont2/a/z/some_file2.txt", true ],
                        # Specific to FS backend with no basePath field set
-                       # array( "$base/unittest-cont3/a/z/some_file3.txt", false ),
+                       # [ "$base/unittest-cont3/a/z/some_file3.txt", false ],
                ];
        }
 
index 5e5e921..09d31fc 100644 (file)
@@ -124,7 +124,7 @@ class FakeDatabase extends DatabaseBase {
         *
         * Example:
         * $id = $dbw->nextSequenceValue( 'page_page_id_seq' );
-        * $dbw->insert( 'page', array( 'page_id' => $id ) );
+        * $dbw->insert( 'page', [ 'page_id' => $id ] );
         * $id = $dbw->insertId();
         *
         * @return int
index 4aa4f41..1dfcd82 100644 (file)
@@ -14,7 +14,7 @@ class CoreVersionCheckerTest extends PHPUnit_Framework_TestCase {
 
        public static function provideCheck() {
                return [
-                       // array( $wgVersion, constraint, expected )
+                       // [ $wgVersion, constraint, expected ]
                        [ '1.25alpha', '>= 1.26', false ],
                        [ '1.25.0', '>= 1.26', false ],
                        [ '1.26alpha', '>= 1.26', true ],
index 4ea9686..3fa8a9f 100644 (file)
@@ -29,10 +29,10 @@ class SpecialSearchTest extends MediaWikiTestCase {
                        $this->newUserWithSearchNS( $userOptions )
                );
                /*
-               $context->setRequest( new FauxRequest( array(
+               $context->setRequest( new FauxRequest( [
                        'ns5'=>true,
                        'ns6'=>true,
-               ) ));
+               ] ));
                 */
                $context->setRequest( new FauxRequest( $requested ) );
                $search = new SpecialSearch();
index 4d914e4..e7ac940 100644 (file)
@@ -355,9 +355,9 @@ class MediaWikiTitleCodecTest extends MediaWikiTestCase {
                        // XML/HTML character entity references
                        // Note: Commented out because they are not marked invalid by the PHP test as
                        // Title::newFromText runs Sanitizer::decodeCharReferencesAndNormalize first.
-                       // array( 'A &eacute; B' ),
-                       // array( 'A &#233; B' ),
-                       // array( 'A &#x00E9; B' ),
+                       // [ 'A &eacute; B' ],
+                       // [ 'A &#233; B' ],
+                       // [ 'A &#x00E9; B' ],
                        // Subject of NS_TALK does not roundtrip to NS_MAIN
                        [ 'Talk:File:Example.svg' ],
                        // Directory navigation