Make lines short to pass phpcs in files under includes/resourceloader
authorAmir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Sun, 27 Sep 2015 08:06:49 +0000 (11:06 +0300)
committerUmherirrender <umherirrender_de.wp@web.de>
Sun, 27 Sep 2015 16:24:07 +0000 (16:24 +0000)
Bug: T102614
Change-Id: I2202438591e74a35570bb621f5aad3ac241fbc29

includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderStartUpModule.php

index 4a9cd0e..c20d386 100644 (file)
@@ -208,7 +208,12 @@ class ResourceLoader implements LoggerAwareInterface {
                if ( !$options['cache'] ) {
                        $result = self::applyFilter( $filter, $data, $this->config );
                } else {
-                       $key = wfGlobalCacheKey( 'resourceloader', 'filter', $filter, self::$filterCacheVersion, md5( $data ) );
+                       $key = wfGlobalCacheKey(
+                               'resourceloader',
+                               'filter',
+                               $filter,
+                               self::$filterCacheVersion, md5( $data )
+                       );
                        $cache = wfGetCache( wfIsHHVM() ? CACHE_ACCEL : CACHE_ANYTHING );
                        $cacheEntry = $cache->get( $key );
                        if ( is_string( $cacheEntry ) ) {
@@ -1380,7 +1385,8 @@ MESSAGE;
         * @return string
         */
        public static function makeLoaderConditionalScript( $script ) {
-               return "window.RLQ = window.RLQ || []; window.RLQ.push( function () {\n" . trim( $script ) . "\n} );";
+               return "window.RLQ = window.RLQ || []; window.RLQ.push( function () {\n" .
+                       trim( $script ) . "\n} );";
        }
 
        /**
index c704c1a..0553df0 100644 (file)
@@ -356,7 +356,11 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                        '$VARS.configuration' => $this->getConfigSettings( $context ),
                        '$VARS.baseModulesUri' => self::getStartupModulesUrl( $context ),
                ) );
-               $pairs['$CODE.registrations()'] = str_replace( "\n", "\n\t", trim( $this->getModuleRegistrations( $context ) ) );
+               $pairs['$CODE.registrations()'] = str_replace(
+                       "\n",
+                       "\n\t",
+                       trim( $this->getModuleRegistrations( $context ) )
+               );
 
                return strtr( $out, $pairs );
        }