Replace uses of join() by implode()
[lhc/web/wiklou.git] / tests / qunit / data / generateJqueryMsgData.php
index 0fcaa5f..5a96dc3 100644 (file)
@@ -65,22 +65,22 @@ require __DIR__ . '/../../../maintenance/Maintenance.php';
 
 class GenerateJqueryMsgData extends Maintenance {
 
-       public static $keyToTestArgs = array(
-               'undelete_short' => array(
-                       array( 0 ),
-                       array( 1 ),
-                       array( 2 ),
-                       array( 5 ),
-                       array( 21 ),
-                       array( 101 )
-               ),
-               'category-subcat-count' => array(
-                       array( 0, 10 ),
-                       array( 1, 1 ),
-                       array( 1, 2 ),
-                       array( 3, 30 )
-               )
-       );
+       public static $keyToTestArgs = [
+               'undelete_short' => [
+                       [ 0 ],
+                       [ 1 ],
+                       [ 2 ],
+                       [ 5 ],
+                       [ 21 ],
+                       [ 101 ]
+               ],
+               'category-subcat-count' => [
+                       [ 0, 10 ],
+                       [ 1, 1 ],
+                       [ 1, 2 ],
+                       [ 3, 30 ]
+               ]
+       ];
 
        public function __construct() {
                parent::__construct();
@@ -94,9 +94,9 @@ class GenerateJqueryMsgData extends Maintenance {
        }
 
        private function getMessagesAndTests() {
-               $messages = array();
-               $tests = array();
-               foreach ( array( 'en', 'fr', 'ar', 'jp', 'zh' ) as $languageCode ) {
+               $messages = [];
+               $tests = [];
+               foreach ( [ 'en', 'fr', 'ar', 'jp', 'zh' ] as $languageCode ) {
                        foreach ( self::$keyToTestArgs as $key => $testArgs ) {
                                foreach ( $testArgs as $args ) {
                                        // Get the raw message, without any transformations.
@@ -109,24 +109,24 @@ class GenerateJqueryMsgData extends Maintenance {
                                        // fake multiple languages by flattening them together.
                                        $langKey = $languageCode . '_' . $key;
                                        $messages[$langKey] = $template;
-                                       $tests[] = array(
-                                               'name' => $languageCode . ' ' . $key . ' ' . join( ',', $args ),
+                                       $tests[] = [
+                                               'name' => $languageCode . ' ' . $key . ' ' . implode( ',', $args ),
                                                'key' => $langKey,
                                                'args' => $args,
                                                'result' => $result,
                                                'lang' => $languageCode
-                                       );
+                                       ];
                                }
                        }
                }
-               return array( $messages, $tests );
+               return [ $messages, $tests ];
        }
 
        private function writeJavascriptFile( $messages, $tests, $dataSpecFile ) {
-               $phpParserData = array(
+               $phpParserData = [
                        'messages' => $messages,
                        'tests' => $tests,
-               );
+               ];
 
                $output =
                        "// This file stores the output from the PHP parser for various messages, arguments,\n"