Passed
Push — master ( cfdd1e...2b821f )
by Marcus
02:49
created
src/LesserPhp/Compiler.php 1 patch
Spacing   +13 added lines, -14 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     // attempts to find the path of an import url, returns null for css files
135 135
     protected function findImport($url)
136 136
     {
137
-        foreach ((array)$this->importDir as $dir) {
137
+        foreach ((array) $this->importDir as $dir) {
138 138
             $full = $dir . (substr($dir, -1) !== '/' ? '/' : '') . $url;
139 139
             if ($this->fileExists($file = $full . '.less') || $this->fileExists($file = $full)) {
140 140
                 return $file;
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         $oldImport = $this->importDir;
237 237
 
238 238
         // TODO: this is because the importDir api is stupid
239
-        $this->importDir = (array)$this->importDir;
239
+        $this->importDir = (array) $this->importDir;
240 240
         array_unshift($this->importDir, $importDir);
241 241
 
242 242
         foreach ($props as $prop) {
@@ -831,7 +831,7 @@  discard block
 block discarded – undo
831 831
 
832 832
                 $orderedArgs = [];
833 833
                 $keywordArgs = [];
834
-                foreach ((array)$args as $arg) {
834
+                foreach ((array) $args as $arg) {
835 835
                     switch ($arg[0]) {
836 836
                         case "arg":
837 837
                             if (!isset($arg[2])) {
@@ -928,8 +928,7 @@  discard block
 block discarded – undo
928 928
                 $result = $this->tryImport($importPath, $block, $out);
929 929
 
930 930
                 $this->env->addImports($importId, $result === false ?
931
-                    [false, "@import " . $this->compileValue($importPath) . ";"] :
932
-                    $result);
931
+                    [false, "@import " . $this->compileValue($importPath) . ";"] : $result);
933 932
 
934 933
                 break;
935 934
             case "import_mixin":
@@ -1051,7 +1050,7 @@  discard block
 block discarded – undo
1051 1050
         }
1052 1051
         list($color, $delta) = $args[2];
1053 1052
         $color = $this->assertions->assertColor($color);
1054
-        $delta = (float)$delta[1];
1053
+        $delta = (float) $delta[1];
1055 1054
 
1056 1055
         return [$color, $delta];
1057 1056
     }
@@ -1078,7 +1077,7 @@  discard block
 block discarded – undo
1078 1077
             $i = 0;
1079 1078
             foreach ($rawComponents as $c) {
1080 1079
                 $val = $this->reduce($c);
1081
-                $val = isset($val[1]) ? (float)$val[1] : 0;
1080
+                $val = isset($val[1]) ? (float) $val[1] : 0;
1082 1081
 
1083 1082
                 if ($i === 0) {
1084 1083
                     $clamp = 360;
@@ -1107,13 +1106,13 @@  discard block
 block discarded – undo
1107 1106
                     if ($c[0] === "number" && $c[2] === "%") {
1108 1107
                         $components[] = 255 * ($c[1] / 100);
1109 1108
                     } else {
1110
-                        $components[] = (float)$c[1];
1109
+                        $components[] = (float) $c[1];
1111 1110
                     }
1112 1111
                 } elseif ($i === 4) {
1113 1112
                     if ($c[0] === "number" && $c[2] === "%") {
1114 1113
                         $components[] = 1.0 * ($c[1] / 100);
1115 1114
                     } else {
1116
-                        $components[] = (float)$c[1];
1115
+                        $components[] = (float) $c[1];
1117 1116
                     }
1118 1117
                 } else {
1119 1118
                     break;
@@ -1162,7 +1161,7 @@  discard block
 block discarded – undo
1162 1161
                     $key = $this->vPrefix . $this->compileValue($this->functions->e($key));
1163 1162
                 }
1164 1163
 
1165
-                $seen =& $this->env->seenNames;
1164
+                $seen = & $this->env->seenNames;
1166 1165
 
1167 1166
                 if (!empty($seen[$key])) {
1168 1167
                     $this->throwError("infinite loop detected: $key");
@@ -1609,7 +1608,7 @@  discard block
 block discarded – undo
1609 1608
                 $name = '@' . $name;
1610 1609
             }
1611 1610
             $parser->count = 0;
1612
-            $parser->buffer = (string)$strValue;
1611
+            $parser->buffer = (string) $strValue;
1613 1612
             if (!$parser->propertyValue($value)) {
1614 1613
                 throw new GeneralException("failed to parse passed in variable $name: $strValue");
1615 1614
             }
@@ -1663,7 +1662,7 @@  discard block
 block discarded – undo
1663 1662
 
1664 1663
         $oldImport = $this->importDir;
1665 1664
 
1666
-        $this->importDir = (array)$this->importDir;
1665
+        $this->importDir = (array) $this->importDir;
1667 1666
         $this->importDir[] = $pi['dirname'] . '/';
1668 1667
 
1669 1668
         $this->addParsedFile($fname);
@@ -1883,12 +1882,12 @@  discard block
 block discarded – undo
1883 1882
 
1884 1883
     public function setImportDir($dirs)
1885 1884
     {
1886
-        $this->importDir = (array)$dirs;
1885
+        $this->importDir = (array) $dirs;
1887 1886
     }
1888 1887
 
1889 1888
     public function addImportDir($dir)
1890 1889
     {
1891
-        $this->importDir = (array)$this->importDir;
1890
+        $this->importDir = (array) $this->importDir;
1892 1891
         $this->importDir[] = $dir;
1893 1892
     }
1894 1893
 
Please login to merge, or discard this patch.
src/LesserPhp/Library/Functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -740,7 +740,7 @@
 block discarded – undo
740 740
      */
741 741
     public function findImport($url)
742 742
     {
743
-        foreach ((array)$this->compiler->importDir as $dir) {
743
+        foreach ((array) $this->compiler->importDir as $dir) {
744 744
             $full = $dir . (substr($dir, -1) !== '/' ? '/' : '') . $url;
745 745
             if ($this->fileExists($file = $full . '.less') || $this->fileExists($file = $full)) {
746 746
                 return $file;
Please login to merge, or discard this patch.
src/LesserPhp/Color/Converter.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,8 +118,7 @@
 block discarded – undo
118 118
             $r = $g = $b = $L;
119 119
         } else {
120 120
             $temp2 = $L < 0.5 ?
121
-                $L * (1.0 + $S) :
122
-                $L + $S - $L * $S;
121
+                $L * (1.0 + $S) : $L + $S - $L * $S;
123 122
 
124 123
             $temp1 = 2.0 * $L - $temp2;
125 124
 
Please login to merge, or discard this patch.