Make lines shorter to pass phpcs under includes/libs
authorAmir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Sat, 26 Sep 2015 18:06:36 +0000 (21:06 +0300)
committerReedy <reedy@wikimedia.org>
Sat, 26 Sep 2015 18:20:34 +0000 (18:20 +0000)
Bug: T102614
Change-Id: I40ca85dbc5849d6ff7ee584c82a8b56d07e095b6

includes/libs/BufferingStatsdDataFactory.php
includes/libs/CSSMin.php

index 100d2a4..a0020da 100644 (file)
@@ -57,7 +57,9 @@ class BufferingStatsdDataFactory extends StatsdDataFactory {
                return str_replace( array( '._', '_.' ), '.', $key );
        }
 
-       public function produceStatsdData( $key, $value = 1, $metric = StatsdDataInterface::STATSD_METRIC_COUNT ) {
+       public function produceStatsdData(
+               $key, $value = 1, $metric = StatsdDataInterface::STATSD_METRIC_COUNT
+       ) {
                $entity = $this->produceStatsdDataEntity();
                if ( $key !== null ) {
                        $key = self::normalizeMetricKey( "{$this->prefix}.{$key}" );
index c93206c..6ca0fed 100644 (file)
@@ -304,7 +304,17 @@ class CSSMin {
                                // Check for global @embed comment and remove it. Allow other comments to be present
                                // before @embed (they have been replaced with placeholders at this point).
                                $embedAll = false;
-                               $rule = preg_replace( '/^((?:\s+|' . CSSMin::PLACEHOLDER . '(\d+)x)*)' . CSSMin::EMBED_REGEX . '\s*/', '$1', $rule, 1, $embedAll );
+                               $rule = preg_replace(
+                                       '/^((?:\s+|' .
+                                               CSSMin::PLACEHOLDER .
+                                               '(\d+)x)*)' .
+                                               CSSMin::EMBED_REGEX .
+                                               '\s*/',
+                                       '$1',
+                                       $rule,
+                                       1,
+                                       $embedAll
+                               );
 
                                // Build two versions of current rule: with remapped URLs
                                // and with embedded data: URIs (where possible).