Avoid extra-long code lines
authorAmir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Sat, 4 Oct 2014 14:02:55 +0000 (17:02 +0300)
committerUmherirrender <umherirrender_de.wp@web.de>
Sat, 4 Oct 2014 16:25:50 +0000 (16:25 +0000)
Makes phpcs happy.

Change-Id: Ideb4d4e7b9f5c385f108b91b26a796ecf6833d47

includes/resourceloader/ResourceLoaderStartUpModule.php

index 2f3d3f8..ee66288 100644 (file)
@@ -387,11 +387,20 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                        $registrations = $this->getModuleRegistrations( $context );
                        // Fix indentation
                        $registrations = str_replace( "\n", "\n\t", trim( $registrations ) );
+                       $mwMapJsCall = Xml::encodeJsCall(
+                               'mw.Map',
+                               array( $this->getConfig()->get( 'LegacyJavaScriptGlobals' ) )
+                       );
+                       $mwConfigSetJsCall = Xml::encodeJsCall(
+                               'mw.config.set',
+                               array( $configuration )
+                       );
+
                        $out .= "var startUp = function () {\n" .
                                "\tmw.config = new " .
-                               Xml::encodeJsCall( 'mw.Map', array( $this->getConfig()->get( 'LegacyJavaScriptGlobals' ) ) ) . "\n" .
+                               $mwMapJsCall . "\n" .
                                "\t$registrations\n" .
-                               "\t" . Xml::encodeJsCall( 'mw.config.set', array( $configuration ) ) .
+                               "\t" . $mwConfigSetJsCall .
                                "};\n";
 
                        // Conditional script injection