Passed
Push — master ( b558c2...d01ccb )
by Chris
04:06
created
vendor/leafo/scssphp/src/Compiler.php 1 patch
Spacing   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
         $out = $this->formatter->format($this->scope, $sourceMapGenerator);
220 220
 
221
-        if (! empty($out) && $this->sourceMap && $this->sourceMap !== self::SOURCE_MAP_NONE) {
221
+        if ( ! empty($out) && $this->sourceMap && $this->sourceMap !== self::SOURCE_MAP_NONE) {
222 222
             $sourceMap    = $sourceMapGenerator->generateJson();
223 223
             $sourceMapUrl = null;
224 224
 
@@ -376,22 +376,22 @@  discard block
 block discarded – undo
376 376
             foreach ($block->selectors as $s) {
377 377
                 $selectors[] = $s;
378 378
 
379
-                if (! is_array($s)) {
379
+                if ( ! is_array($s)) {
380 380
                     continue;
381 381
                 }
382 382
 
383 383
                 // check extends
384
-                if (! empty($this->extendsMap)) {
384
+                if ( ! empty($this->extendsMap)) {
385 385
                     $this->matchExtends($s, $selectors);
386 386
 
387 387
                     // remove duplicates
388
-                    array_walk($selectors, function (&$value) {
388
+                    array_walk($selectors, function(&$value) {
389 389
                         $value = serialize($value);
390 390
                     });
391 391
 
392 392
                     $selectors = array_unique($selectors);
393 393
 
394
-                    array_walk($selectors, function (&$value) {
394
+                    array_walk($selectors, function(&$value) {
395 395
                         $value = unserialize($value);
396 396
                     });
397 397
                 }
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
                         $slice = $tempReplacement[$l];
460 460
                         array_unshift($replacement, $slice);
461 461
 
462
-                        if (! $this->isImmediateRelationshipCombinator(end($slice))) {
462
+                        if ( ! $this->isImmediateRelationshipCombinator(end($slice))) {
463 463
                             break;
464 464
                         }
465 465
                     }
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
                     $this->matchExtends($result, $out, count($before) + count($mergedBefore), false);
487 487
 
488 488
                     // selector sequence merging
489
-                    if (! empty($before) && count($new) > 1) {
489
+                    if ( ! empty($before) && count($new) > 1) {
490 490
                         $sharedParts = $k > 0 ? array_slice($before, 0, $k) : [];
491 491
                         $postSharedParts = $k > 0 ? array_slice($before, $k) : $before;
492 492
 
@@ -524,11 +524,11 @@  discard block
 block discarded – undo
524 524
 
525 525
         foreach ($rawSingle as $part) {
526 526
             // matches Number
527
-            if (! is_string($part)) {
527
+            if ( ! is_string($part)) {
528 528
                 return false;
529 529
             }
530 530
 
531
-            if (! preg_match('/^[\[.:#%]/', $part) && count($single)) {
531
+            if ( ! preg_match('/^[\[.:#%]/', $part) && count($single)) {
532 532
                 $single[count($single) - 1] .= $part;
533 533
             } else {
534 534
                 $single[] = $part;
@@ -677,7 +677,7 @@  discard block
 block discarded – undo
677 677
 
678 678
         $mediaQuery = $this->compileMediaQuery($this->multiplyMedia($this->env));
679 679
 
680
-        if (! empty($mediaQuery)) {
680
+        if ( ! empty($mediaQuery)) {
681 681
             $this->scope = $this->makeOutputBlock(Type::T_MEDIA, [$mediaQuery]);
682 682
 
683 683
             $parentScope = $this->mediaParent($this->scope);
@@ -730,8 +730,8 @@  discard block
 block discarded – undo
730 730
      */
731 731
     protected function mediaParent(OutputBlock $scope)
732 732
     {
733
-        while (! empty($scope->parent)) {
734
-            if (! empty($scope->type) && $scope->type !== Type::T_MEDIA) {
733
+        while ( ! empty($scope->parent)) {
734
+            if ( ! empty($scope->type) && $scope->type !== Type::T_MEDIA) {
735 735
                 break;
736 736
             }
737 737
 
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
     {
751 751
         $s = '@' . $block->name;
752 752
 
753
-        if (! empty($block->value)) {
753
+        if ( ! empty($block->value)) {
754 754
             $s .= ' ' . $this->compileValue($block->value);
755 755
         }
756 756
 
@@ -815,7 +815,7 @@  discard block
 block discarded – undo
815 815
         $newBlock = null;
816 816
 
817 817
         foreach ($envs as $e) {
818
-            if (! isset($e->block)) {
818
+            if ( ! isset($e->block)) {
819 819
                 continue;
820 820
             }
821 821
 
@@ -988,7 +988,7 @@  discard block
 block discarded – undo
988 988
 
989 989
         $envs = $this->compactEnv($env);
990 990
 
991
-        $this->env = $this->extractEnv(array_filter($envs, function (Environment $e) {
991
+        $this->env = $this->extractEnv(array_filter($envs, function(Environment $e) {
992 992
             return ! isset($e->block->selectors);
993 993
         }));
994 994
 
@@ -1180,7 +1180,7 @@  discard block
 block discarded – undo
1180 1180
 
1181 1181
             array_walk_recursive(
1182 1182
                 $selector,
1183
-                function ($value, $key) use (&$output) {
1183
+                function($value, $key) use (&$output) {
1184 1184
                     $output .= $value;
1185 1185
                 }
1186 1186
             );
@@ -1230,7 +1230,7 @@  discard block
 block discarded – undo
1230 1230
      */
1231 1231
     protected function compileSelector($selector)
1232 1232
     {
1233
-        if (! is_array($selector)) {
1233
+        if ( ! is_array($selector)) {
1234 1234
             return $selector; // media and the like
1235 1235
         }
1236 1236
 
@@ -1253,7 +1253,7 @@  discard block
 block discarded – undo
1253 1253
     protected function compileSelectorPart($piece)
1254 1254
     {
1255 1255
         foreach ($piece as &$p) {
1256
-            if (! is_array($p)) {
1256
+            if ( ! is_array($p)) {
1257 1257
                 continue;
1258 1258
             }
1259 1259
 
@@ -1280,7 +1280,7 @@  discard block
 block discarded – undo
1280 1280
      */
1281 1281
     protected function hasSelectorPlaceholder($selector)
1282 1282
     {
1283
-        if (! is_array($selector)) {
1283
+        if ( ! is_array($selector)) {
1284 1284
             return false;
1285 1285
         }
1286 1286
 
@@ -1392,7 +1392,7 @@  discard block
 block discarded – undo
1392 1392
                 array_unshift($parts, implode(' ', array_filter($type)));
1393 1393
             }
1394 1394
 
1395
-            if (! empty($parts)) {
1395
+            if ( ! empty($parts)) {
1396 1396
                 if ($first) {
1397 1397
                     $first = false;
1398 1398
                     $out .= ' ';
@@ -1416,7 +1416,7 @@  discard block
 block discarded – undo
1416 1416
         $part1 = end($selectors1);
1417 1417
         $part2 = end($selectors2);
1418 1418
 
1419
-        if (! $this->isImmediateRelationshipCombinator($part1[0]) || $part1 !== $part2) {
1419
+        if ( ! $this->isImmediateRelationshipCombinator($part1[0]) || $part1 !== $part2) {
1420 1420
             return array_merge($selectors1, $selectors2);
1421 1421
         }
1422 1422
 
@@ -1433,7 +1433,7 @@  discard block
 block discarded – undo
1433 1433
 
1434 1434
             array_unshift($merged, $part1);
1435 1435
             array_unshift($merged, [array_pop($selectors1)[0] . array_pop($selectors2)[0]]);
1436
-        } while (! empty($selectors1) && ! empty($selectors2));
1436
+        } while ( ! empty($selectors1) && ! empty($selectors2));
1437 1437
 
1438 1438
         return $merged;
1439 1439
     }
@@ -1460,8 +1460,8 @@  discard block
 block discarded – undo
1460 1460
         $t1 = '';
1461 1461
 
1462 1462
         if (count($type1) > 1) {
1463
-            $m1= strtolower($type1[0]);
1464
-            $t1= strtolower($type1[1]);
1463
+            $m1 = strtolower($type1[0]);
1464
+            $t1 = strtolower($type1[1]);
1465 1465
         } else {
1466 1466
             $t1 = strtolower($type1[0]);
1467 1467
         }
@@ -1501,7 +1501,7 @@  discard block
 block discarded – undo
1501 1501
         }
1502 1502
 
1503 1503
         // t1 == t2, neither m1 nor m2 are "not"
1504
-        return [empty($m1)? $m2 : $m1, $t1];
1504
+        return [empty($m1) ? $m2 : $m1, $t1];
1505 1505
     }
1506 1506
 
1507 1507
     /**
@@ -1519,7 +1519,7 @@  discard block
 block discarded – undo
1519 1519
             $path = $this->compileStringContent($rawPath);
1520 1520
 
1521 1521
             if ($path = $this->findImport($path)) {
1522
-                if (! $once || ! in_array($path, $this->importedFiles)) {
1522
+                if ( ! $once || ! in_array($path, $this->importedFiles)) {
1523 1523
                     $this->importFile($path, $out);
1524 1524
                     $this->importedFiles[] = $path;
1525 1525
                 }
@@ -1572,7 +1572,7 @@  discard block
 block discarded – undo
1572 1572
 
1573 1573
                 $rawPath = $this->reduce($rawPath);
1574 1574
 
1575
-                if (! $this->compileImport($rawPath, $out, true)) {
1575
+                if ( ! $this->compileImport($rawPath, $out, true)) {
1576 1576
                     $out->lines[] = '@import ' . $this->compileValue($rawPath) . ';';
1577 1577
                 }
1578 1578
                 break;
@@ -1582,7 +1582,7 @@  discard block
 block discarded – undo
1582 1582
 
1583 1583
                 $rawPath = $this->reduce($rawPath);
1584 1584
 
1585
-                if (! $this->compileImport($rawPath, $out)) {
1585
+                if ( ! $this->compileImport($rawPath, $out)) {
1586 1586
                     $out->lines[] = '@import ' . $this->compileValue($rawPath) . ';';
1587 1587
                 }
1588 1588
                 break;
@@ -1604,7 +1604,7 @@  discard block
 block discarded – undo
1604 1604
                 break;
1605 1605
 
1606 1606
             case Type::T_CHARSET:
1607
-                if (! $this->charsetSeen) {
1607
+                if ( ! $this->charsetSeen) {
1608 1608
                     $this->charsetSeen = true;
1609 1609
 
1610 1610
                     $out->lines[] = '@charset ' . $this->compileValue($child[1]) . ';';
@@ -1628,7 +1628,7 @@  discard block
 block discarded – undo
1628 1628
                         (($result = $this->get($name[1], false)) === null
1629 1629
                         || $result === static::$null);
1630 1630
 
1631
-                    if (! $isDefault || $shouldSet) {
1631
+                    if ( ! $isDefault || $shouldSet) {
1632 1632
                         $this->set($name[1], $this->reduce($value));
1633 1633
                     }
1634 1634
                     break;
@@ -1774,7 +1774,7 @@  discard block
 block discarded – undo
1774 1774
                 $start = $this->reduce($for->start, true);
1775 1775
                 $end   = $this->reduce($for->end, true);
1776 1776
 
1777
-                if (! ($start[2] == $end[2] || $end->unitless())) {
1777
+                if ( ! ($start[2] == $end[2] || $end->unitless())) {
1778 1778
                     $this->throwError('Incompatible units: "%s" and "%s".', $start->unitStr(), $end->unitStr());
1779 1779
 
1780 1780
                     break;
@@ -1787,7 +1787,7 @@  discard block
 block discarded – undo
1787 1787
                 $d = $start < $end ? 1 : -1;
1788 1788
 
1789 1789
                 for (;;) {
1790
-                    if ((! $for->until && $start - $d == $end) ||
1790
+                    if (( ! $for->until && $start - $d == $end) ||
1791 1791
                         ($for->until && $start == $end)
1792 1792
                     ) {
1793 1793
                         break;
@@ -1848,7 +1848,7 @@  discard block
 block discarded – undo
1848 1848
 
1849 1849
                 $mixin = $this->get(static::$namespaces['mixin'] . $name, false);
1850 1850
 
1851
-                if (! $mixin) {
1851
+                if ( ! $mixin) {
1852 1852
                     $this->throwError("Undefined mixin $name");
1853 1853
                     break;
1854 1854
                 }
@@ -1885,7 +1885,7 @@  discard block
 block discarded – undo
1885 1885
                 $content = $this->get(static::$namespaces['special'] . 'content', false, $this->getStoreEnv())
1886 1886
                          ?: $this->get(static::$namespaces['special'] . 'content', false, $this->env);
1887 1887
 
1888
-                if (! $content) {
1888
+                if ( ! $content) {
1889 1889
                     $content = new \stdClass();
1890 1890
                     $content->scope = new \stdClass();
1891 1891
                     $content->children = $this->storeEnv->parent->block->children;
@@ -2068,7 +2068,7 @@  discard block
 block discarded – undo
2068 2068
                 ) {
2069 2069
                     $coerceUnit = false;
2070 2070
 
2071
-                    if (! isset($genOp) &&
2071
+                    if ( ! isset($genOp) &&
2072 2072
                         $left[0] === Type::T_NUMBER && $right[0] === Type::T_NUMBER
2073 2073
                     ) {
2074 2074
                         $coerceUnit = true;
@@ -2098,7 +2098,7 @@  discard block
 block discarded – undo
2098 2098
                                 $targetUnit = $left->unitless() ? $right[2] : $left[2];
2099 2099
                         }
2100 2100
 
2101
-                        if (! $left->unitless() && ! $right->unitless()) {
2101
+                        if ( ! $left->unitless() && ! $right->unitless()) {
2102 2102
                             $left = $left->normalize();
2103 2103
                             $right = $right->normalize();
2104 2104
                         }
@@ -2395,7 +2395,7 @@  discard block
 block discarded – undo
2395 2395
      */
2396 2396
     protected function opAnd($left, $right, $shouldEval)
2397 2397
     {
2398
-        if (! $shouldEval) {
2398
+        if ( ! $shouldEval) {
2399 2399
             return;
2400 2400
         }
2401 2401
 
@@ -2417,7 +2417,7 @@  discard block
 block discarded – undo
2417 2417
      */
2418 2418
     protected function opOr($left, $right, $shouldEval)
2419 2419
     {
2420
-        if (! $shouldEval) {
2420
+        if ( ! $shouldEval) {
2421 2421
             return;
2422 2422
         }
2423 2423
 
@@ -2751,7 +2751,7 @@  discard block
 block discarded – undo
2751 2751
                     $filtered[$this->compileValue($keys[$i])] = $this->compileValue($values[$i]);
2752 2752
                 }
2753 2753
 
2754
-                array_walk($filtered, function (&$value, $key) {
2754
+                array_walk($filtered, function(&$value, $key) {
2755 2755
                     $value = $key . ': ' . $value;
2756 2756
                 });
2757 2757
 
@@ -2969,7 +2969,7 @@  discard block
 block discarded – undo
2969 2969
      */
2970 2970
     protected function multiplyMedia(Environment $env = null, $childQueries = null)
2971 2971
     {
2972
-        if (! isset($env) ||
2972
+        if ( ! isset($env) ||
2973 2973
             ! empty($env->block->type) && $env->block->type !== Type::T_MEDIA
2974 2974
         ) {
2975 2975
             return $childQueries;
@@ -2992,7 +2992,7 @@  discard block
 block discarded – undo
2992 2992
 
2993 2993
             foreach ($parentQueries as $parentQuery) {
2994 2994
                 foreach ($originalQueries as $childQuery) {
2995
-                    $childQueries []= array_merge($parentQuery, $childQuery);
2995
+                    $childQueries [] = array_merge($parentQuery, $childQuery);
2996 2996
                 }
2997 2997
             }
2998 2998
         }
@@ -3083,7 +3083,7 @@  discard block
 block discarded – undo
3083 3083
     {
3084 3084
         $name = $this->normalizeName($name);
3085 3085
 
3086
-        if (! isset($env)) {
3086
+        if ( ! isset($env)) {
3087 3087
             $env = $this->getStoreEnv();
3088 3088
         }
3089 3089
 
@@ -3112,12 +3112,12 @@  discard block
 block discarded – undo
3112 3112
                 break;
3113 3113
             }
3114 3114
 
3115
-            if (! $hasNamespace && isset($env->marker)) {
3115
+            if ( ! $hasNamespace && isset($env->marker)) {
3116 3116
                 $env = $storeEnv;
3117 3117
                 break;
3118 3118
             }
3119 3119
 
3120
-            if (! isset($env->parent)) {
3120
+            if ( ! isset($env->parent)) {
3121 3121
                 $env = $storeEnv;
3122 3122
                 break;
3123 3123
             }
@@ -3156,7 +3156,7 @@  discard block
 block discarded – undo
3156 3156
         $normalizedName = $this->normalizeName($name);
3157 3157
         $specialContentKey = static::$namespaces['special'] . 'content';
3158 3158
 
3159
-        if (! isset($env)) {
3159
+        if ( ! isset($env)) {
3160 3160
             $env = $this->getStoreEnv();
3161 3161
         }
3162 3162
 
@@ -3168,8 +3168,8 @@  discard block
 block discarded – undo
3168 3168
                 return $env->store[$normalizedName];
3169 3169
             }
3170 3170
 
3171
-            if (! $hasNamespace && isset($env->marker)) {
3172
-                if (! $nextIsRoot && ! empty($env->store[$specialContentKey])) {
3171
+            if ( ! $hasNamespace && isset($env->marker)) {
3172
+                if ( ! $nextIsRoot && ! empty($env->store[$specialContentKey])) {
3173 3173
                     $env = $env->store[$specialContentKey]->scope;
3174 3174
                     $nextIsRoot = true;
3175 3175
                     continue;
@@ -3179,7 +3179,7 @@  discard block
 block discarded – undo
3179 3179
                 continue;
3180 3180
             }
3181 3181
 
3182
-            if (! isset($env->parent)) {
3182
+            if ( ! isset($env->parent)) {
3183 3183
                 break;
3184 3184
             }
3185 3185
 
@@ -3224,7 +3224,7 @@  discard block
 block discarded – undo
3224 3224
                 $name = substr($name, 1);
3225 3225
             }
3226 3226
 
3227
-            if (! $parser->parseValue($strValue, $value)) {
3227
+            if ( ! $parser->parseValue($strValue, $value)) {
3228 3228
                 $value = $this->coerceValue($strValue);
3229 3229
             }
3230 3230
 
@@ -3303,7 +3303,7 @@  discard block
 block discarded – undo
3303 3303
      */
3304 3304
     public function addImportPath($path)
3305 3305
     {
3306
-        if (! in_array($path, $this->importPaths)) {
3306
+        if ( ! in_array($path, $this->importPaths)) {
3307 3307
             $this->importPaths[] = $path;
3308 3308
         }
3309 3309
     }
@@ -3461,7 +3461,7 @@  discard block
 block discarded – undo
3461 3461
         $urls = [];
3462 3462
 
3463 3463
         // for "normal" scss imports (ignore vanilla css and external requests)
3464
-        if (! preg_match('/\.css$|^https?:\/\//', $url)) {
3464
+        if ( ! preg_match('/\.css$|^https?:\/\//', $url)) {
3465 3465
             // try both normal and the _partial filename
3466 3466
             $urls = [$url, preg_replace('/[^\/]+$/', '_\0', $url)];
3467 3467
         }
@@ -3473,7 +3473,7 @@  discard block
 block discarded – undo
3473 3473
                 // check urls for normal import paths
3474 3474
                 foreach ($urls as $full) {
3475 3475
                     $full = $dir
3476
-                        . (! empty($dir) && substr($dir, -1) !== '/' ? '/' : '')
3476
+                        . ( ! empty($dir) && substr($dir, -1) !== '/' ? '/' : '')
3477 3477
                         . $full;
3478 3478
 
3479 3479
                     if ($this->fileExists($file = $full . '.scss') ||
@@ -3590,7 +3590,7 @@  discard block
 block discarded – undo
3590 3590
     {
3591 3591
         $func = $this->get(static::$namespaces['function'] . $name, false);
3592 3592
 
3593
-        if (! $func) {
3593
+        if ( ! $func) {
3594 3594
             return false;
3595 3595
         }
3596 3596
 
@@ -3656,7 +3656,7 @@  discard block
 block discarded – undo
3656 3656
 
3657 3657
         $returnValue = call_user_func($f, $sorted, $kwargs);
3658 3658
 
3659
-        if (! isset($returnValue)) {
3659
+        if ( ! isset($returnValue)) {
3660 3660
             return false;
3661 3661
         }
3662 3662
 
@@ -3676,7 +3676,7 @@  discard block
 block discarded – undo
3676 3676
     {
3677 3677
         $libName = 'lib' . preg_replace_callback(
3678 3678
             '/_(.)/',
3679
-            function ($m) {
3679
+            function($m) {
3680 3680
                 return ucfirst($m[1]);
3681 3681
             },
3682 3682
             ucfirst($name)
@@ -3711,7 +3711,7 @@  discard block
 block discarded – undo
3711 3711
             }
3712 3712
         }
3713 3713
 
3714
-        if (! isset($prototype)) {
3714
+        if ( ! isset($prototype)) {
3715 3715
             return [$posArgs, $keyArgs];
3716 3716
         }
3717 3717
 
@@ -3761,8 +3761,8 @@  discard block
 block discarded – undo
3761 3761
 
3762 3762
         // assign the keyword args
3763 3763
         foreach ((array) $argValues as $arg) {
3764
-            if (! empty($arg[0])) {
3765
-                if (! isset($args[$arg[0][1]])) {
3764
+            if ( ! empty($arg[0])) {
3765
+                if ( ! isset($args[$arg[0][1]])) {
3766 3766
                     if ($hasVariable) {
3767 3767
                         $deferredKeywordArgs[$arg[0][1]] = $arg[1];
3768 3768
                     } else {
@@ -3783,7 +3783,7 @@  discard block
 block discarded – undo
3783 3783
 
3784 3784
                 if ($val[0] === Type::T_LIST) {
3785 3785
                     foreach ($val[2] as $name => $item) {
3786
-                        if (! is_numeric($name)) {
3786
+                        if ( ! is_numeric($name)) {
3787 3787
                             $keywordArgs[$name] = $item;
3788 3788
                         } else {
3789 3789
                             $remaining[] = $item;
@@ -3794,7 +3794,7 @@  discard block
 block discarded – undo
3794 3794
                         $name = $this->compileStringContent($this->coerceString($name));
3795 3795
                         $item = $val[2][$i];
3796 3796
 
3797
-                        if (! is_numeric($name)) {
3797
+                        if ( ! is_numeric($name)) {
3798 3798
                             $keywordArgs[$name] = $item;
3799 3799
                         } else {
3800 3800
                             $remaining[] = $item;
@@ -3825,7 +3825,7 @@  discard block
 block discarded – undo
3825 3825
                 $val = $remaining[$i];
3826 3826
             } elseif (isset($keywordArgs[$name])) {
3827 3827
                 $val = $keywordArgs[$name];
3828
-            } elseif (! empty($default)) {
3828
+            } elseif ( ! empty($default)) {
3829 3829
                 continue;
3830 3830
             } else {
3831 3831
                 $this->throwError("Missing argument $name");
@@ -3956,7 +3956,7 @@  discard block
 block discarded – undo
3956 3956
             return [Type::T_LIST, ',', $list];
3957 3957
         }
3958 3958
 
3959
-        return [Type::T_LIST, $delim, ! isset($item) ? []: [$item]];
3959
+        return [Type::T_LIST, $delim, ! isset($item) ? [] : [$item]];
3960 3960
     }
3961 3961
 
3962 3962
     /**
@@ -4031,7 +4031,7 @@  discard block
 block discarded – undo
4031 4031
     protected function coercePercent($value)
4032 4032
     {
4033 4033
         if ($value[0] === Type::T_NUMBER) {
4034
-            if (! empty($value[2]['%'])) {
4034
+            if ( ! empty($value[2]['%'])) {
4035 4035
                 return $value[1] / 100;
4036 4036
             }
4037 4037
 
@@ -4211,7 +4211,7 @@  discard block
 block discarded – undo
4211 4211
         }
4212 4212
 
4213 4213
         if ($h * 3 < 2) {
4214
-            return $m1 + ($m2 - $m1) * (2/3 - $h) * 6;
4214
+            return $m1 + ($m2 - $m1) * (2 / 3 - $h) * 6;
4215 4215
         }
4216 4216
 
4217 4217
         return $m1;
@@ -4241,9 +4241,9 @@  discard block
 block discarded – undo
4241 4241
         $m2 = $l <= 0.5 ? $l * ($s + 1) : $l + $s - $l * $s;
4242 4242
         $m1 = $l * 2 - $m2;
4243 4243
 
4244
-        $r = $this->hueToRGB($m1, $m2, $h + 1/3) * 255;
4244
+        $r = $this->hueToRGB($m1, $m2, $h + 1 / 3) * 255;
4245 4245
         $g = $this->hueToRGB($m1, $m2, $h) * 255;
4246
-        $b = $this->hueToRGB($m1, $m2, $h - 1/3) * 255;
4246
+        $b = $this->hueToRGB($m1, $m2, $h - 1 / 3) * 255;
4247 4247
 
4248 4248
         $out = [Type::T_COLOR, $r, $g, $b];
4249 4249
 
@@ -4258,7 +4258,7 @@  discard block
 block discarded – undo
4258 4258
         $name = $this->compileStringContent($this->coerceString($this->reduce(array_shift($args), true)));
4259 4259
 
4260 4260
         $args = array_map(
4261
-            function ($a) {
4261
+            function($a) {
4262 4262
                 return [null, $a, false];
4263 4263
             },
4264 4264
             $args
@@ -4278,7 +4278,7 @@  discard block
 block discarded – undo
4278 4278
     {
4279 4279
         list($cond, $t, $f) = $args;
4280 4280
 
4281
-        if (! $this->isTruthy($this->reduce($cond, true))) {
4281
+        if ( ! $this->isTruthy($this->reduce($cond, true))) {
4282 4282
             return $this->reduce($f, true);
4283 4283
         }
4284 4284
 
@@ -4384,7 +4384,7 @@  discard block
 block discarded – undo
4384 4384
     ];
4385 4385
     protected function libAdjustColor($args)
4386 4386
     {
4387
-        return $this->alterColor($args, function ($base, $alter, $i) {
4387
+        return $this->alterColor($args, function($base, $alter, $i) {
4388 4388
             return $base + $alter;
4389 4389
         });
4390 4390
     }
@@ -4395,7 +4395,7 @@  discard block
 block discarded – undo
4395 4395
     ];
4396 4396
     protected function libChangeColor($args)
4397 4397
     {
4398
-        return $this->alterColor($args, function ($base, $alter, $i) {
4398
+        return $this->alterColor($args, function($base, $alter, $i) {
4399 4399
             return $alter;
4400 4400
         });
4401 4401
     }
@@ -4406,7 +4406,7 @@  discard block
 block discarded – undo
4406 4406
     ];
4407 4407
     protected function libScaleColor($args)
4408 4408
     {
4409
-        return $this->alterColor($args, function ($base, $scale, $i) {
4409
+        return $this->alterColor($args, function($base, $scale, $i) {
4410 4410
             // 1, 2, 3 - rgb
4411 4411
             // 4, 5, 6 - hsl
4412 4412
             // 7 - a
@@ -4504,7 +4504,7 @@  discard block
 block discarded – undo
4504 4504
         $first = $this->assertColor($first);
4505 4505
         $second = $this->assertColor($second);
4506 4506
 
4507
-        if (! isset($weight)) {
4507
+        if ( ! isset($weight)) {
4508 4508
             $weight = 0.5;
4509 4509
         } else {
4510 4510
             $weight = $this->coercePercent($weight);
@@ -4895,7 +4895,7 @@  discard block
 block discarded – undo
4895 4895
             $n += count($list[2]);
4896 4896
         }
4897 4897
 
4898
-        if (! isset($list[2][$n])) {
4898
+        if ( ! isset($list[2][$n])) {
4899 4899
             $this->throwError('Invalid argument for "n"');
4900 4900
 
4901 4901
             return;
@@ -4997,7 +4997,7 @@  discard block
 block discarded – undo
4997 4997
 
4998 4998
     protected function listSeparatorForJoin($list1, $sep)
4999 4999
     {
5000
-        if (! isset($sep)) {
5000
+        if ( ! isset($sep)) {
5001 5001
             return $list1[1];
5002 5002
         }
5003 5003
 
@@ -5117,7 +5117,7 @@  discard block
 block discarded – undo
5117 5117
     {
5118 5118
         list($number1, $number2) = $args;
5119 5119
 
5120
-        if (! isset($number1[0]) || $number1[0] !== Type::T_NUMBER ||
5120
+        if ( ! isset($number1[0]) || $number1[0] !== Type::T_NUMBER ||
5121 5121
             ! isset($number2[0]) || $number2[0] !== Type::T_NUMBER
5122 5122
         ) {
5123 5123
             $this->throwError('Invalid argument(s) for "comparable"');
@@ -5315,7 +5315,7 @@  discard block
 block discarded – undo
5315 5315
     {
5316 5316
         static $id;
5317 5317
 
5318
-        if (! isset($id)) {
5318
+        if ( ! isset($id)) {
5319 5319
             $id = mt_rand(0, pow(36, 8));
5320 5320
         }
5321 5321
 
Please login to merge, or discard this patch.
vendor/leafo/scssphp/src/Node/Number.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
     {
268 268
         $dimension = round($this->dimension, static::$precision);
269 269
 
270
-        $units = array_filter($this->units, function ($unitSize) {
270
+        $units = array_filter($this->units, function($unitSize) {
271 271
             return $unitSize;
272 272
         });
273 273
 
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
             $this->normalizeUnits($dimension, $units, 'in');
279 279
 
280 280
             $dimension = round($dimension, static::$precision);
281
-            $units     = array_filter($units, function ($unitSize) {
281
+            $units     = array_filter($units, function($unitSize) {
282 282
                 return $unitSize;
283 283
             });
284 284
         }
Please login to merge, or discard this patch.
vendor/leafo/scssphp/src/Formatter/Nested.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
         $this->write($inner . implode($glue, $block->lines));
70 70
 
71
-        if (! empty($block->children)) {
71
+        if ( ! empty($block->children)) {
72 72
             $this->write($this->break);
73 73
         }
74 74
     }
@@ -125,21 +125,21 @@  discard block
 block discarded – undo
125 125
 
126 126
         $this->depth = $block->depth;
127 127
 
128
-        if (! empty($block->selectors)) {
128
+        if ( ! empty($block->selectors)) {
129 129
             $this->blockSelectors($block);
130 130
 
131 131
             $this->indentLevel++;
132 132
         }
133 133
 
134
-        if (! empty($block->lines)) {
134
+        if ( ! empty($block->lines)) {
135 135
             $this->blockLines($block);
136 136
         }
137 137
 
138
-        if (! empty($block->children)) {
138
+        if ( ! empty($block->children)) {
139 139
             $this->blockChildren($block);
140 140
         }
141 141
 
142
-        if (! empty($block->selectors)) {
142
+        if ( ! empty($block->selectors)) {
143 143
             $this->indentLevel--;
144 144
 
145 145
             $this->write($this->close);
Please login to merge, or discard this patch.
vendor/leafo/scssphp/src/Formatter/Compressed.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 
56 56
         $this->write($inner . implode($glue, $block->lines));
57 57
 
58
-        if (! empty($block->children)) {
58
+        if ( ! empty($block->children)) {
59 59
             $this->write($this->break);
60 60
         }
61 61
     }
Please login to merge, or discard this patch.
vendor/leafo/scssphp/src/Formatter/Crunched.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 
54 54
         $this->write($inner . implode($glue, $block->lines));
55 55
 
56
-        if (! empty($block->children)) {
56
+        if ( ! empty($block->children)) {
57 57
             $this->write($this->break);
58 58
         }
59 59
     }
Please login to merge, or discard this patch.