From 4e7cc78b4f17af910658d5a969ea1ac0bea16c63 Mon Sep 17 00:00:00 2001 From: "Amir E. Aharoni" Date: Sun, 27 Sep 2015 11:06:49 +0300 Subject: [PATCH] Make lines short to pass phpcs in files under includes/resourceloader Bug: T102614 Change-Id: I2202438591e74a35570bb621f5aad3ac241fbc29 --- includes/resourceloader/ResourceLoader.php | 10 ++++++++-- .../resourceloader/ResourceLoaderStartUpModule.php | 6 +++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index 4a9cd0e21b..c20d38642a 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -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} );"; } /** diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index c704c1a8ef..0553df09a2 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -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 ); } -- 2.20.1