Passed
Branch master (cfdd1e)
by Marcus
03:59
created
lessc.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require __DIR__.'/vendor/autoload.php';
3
+require __DIR__ . '/vendor/autoload.php';
4 4
 
5 5
 /**
6 6
  * lesserphp
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
@@ -716,7 +716,7 @@
 block discarded – undo
716 716
     // attempts to find the path of an import url, returns null for css files
717 717
     public function findImport($url)
718 718
     {
719
-        foreach ((array)$this->compiler->importDir as $dir) {
719
+        foreach ((array) $this->compiler->importDir as $dir) {
720 720
             $full = $dir . (substr($dir, -1) !== '/' ? '/' : '') . $url;
721 721
             if ($this->fileExists($file = $full . '.less') || $this->fileExists($file = $full)) {
722 722
                 return $file;
Please login to merge, or discard this patch.
src/LesserPhp/Compiler.php 1 patch
Spacing   +14 added lines, -16 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     // attempts to find the path of an import url, returns null for css files
133 133
     protected function findImport($url)
134 134
     {
135
-        foreach ((array)$this->importDir as $dir) {
135
+        foreach ((array) $this->importDir as $dir) {
136 136
             $full = $dir . (substr($dir, -1) !== '/' ? '/' : '') . $url;
137 137
             if ($this->fileExists($file = $full . '.less') || $this->fileExists($file = $full)) {
138 138
                 return $file;
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         $oldImport = $this->importDir;
235 235
 
236 236
         // TODO: this is because the importDir api is stupid
237
-        $this->importDir = (array)$this->importDir;
237
+        $this->importDir = (array) $this->importDir;
238 238
         array_unshift($this->importDir, $importDir);
239 239
 
240 240
         foreach ($props as $prop) {
@@ -830,7 +830,7 @@  discard block
 block discarded – undo
830 830
 
831 831
                 $orderedArgs = [];
832 832
                 $keywordArgs = [];
833
-                foreach ((array)$args as $arg) {
833
+                foreach ((array) $args as $arg) {
834 834
                     switch ($arg[0]) {
835 835
                         case "arg":
836 836
                             if (!isset($arg[2])) {
@@ -927,8 +927,7 @@  discard block
 block discarded – undo
927 927
                 $result = $this->tryImport($importPath, $block, $out);
928 928
 
929 929
                 $this->env->addImports($importId, $result === false ?
930
-                    [false, "@import " . $this->compileValue($importPath) . ";"] :
931
-                    $result);
930
+                    [false, "@import " . $this->compileValue($importPath) . ";"] : $result);
932 931
 
933 932
                 break;
934 933
             case "import_mixin":
@@ -1050,7 +1049,7 @@  discard block
 block discarded – undo
1050 1049
         }
1051 1050
         list($color, $delta) = $args[2];
1052 1051
         $color = $this->assertions->assertColor($color);
1053
-        $delta = (float)$delta[1];
1052
+        $delta = (float) $delta[1];
1054 1053
 
1055 1054
         return [$color, $delta];
1056 1055
     }
@@ -1145,8 +1144,7 @@  discard block
 block discarded – undo
1145 1144
             $r = $g = $b = $L;
1146 1145
         } else {
1147 1146
             $temp2 = $L < 0.5 ?
1148
-                $L * (1.0 + $S) :
1149
-                $L + $S - $L * $S;
1147
+                $L * (1.0 + $S) : $L + $S - $L * $S;
1150 1148
 
1151 1149
             $temp1 = 2.0 * $L - $temp2;
1152 1150
 
@@ -1191,7 +1189,7 @@  discard block
 block discarded – undo
1191 1189
             $i = 0;
1192 1190
             foreach ($rawComponents as $c) {
1193 1191
                 $val = $this->reduce($c);
1194
-                $val = isset($val[1]) ? (float)$val[1] : 0;
1192
+                $val = isset($val[1]) ? (float) $val[1] : 0;
1195 1193
 
1196 1194
                 if ($i === 0) {
1197 1195
                     $clamp = 360;
@@ -1220,13 +1218,13 @@  discard block
 block discarded – undo
1220 1218
                     if ($c[0] === "number" && $c[2] === "%") {
1221 1219
                         $components[] = 255 * ($c[1] / 100);
1222 1220
                     } else {
1223
-                        $components[] = (float)$c[1];
1221
+                        $components[] = (float) $c[1];
1224 1222
                     }
1225 1223
                 } elseif ($i === 4) {
1226 1224
                     if ($c[0] === "number" && $c[2] === "%") {
1227 1225
                         $components[] = 1.0 * ($c[1] / 100);
1228 1226
                     } else {
1229
-                        $components[] = (float)$c[1];
1227
+                        $components[] = (float) $c[1];
1230 1228
                     }
1231 1229
                 } else {
1232 1230
                     break;
@@ -1269,7 +1267,7 @@  discard block
 block discarded – undo
1269 1267
                     $key = $this->vPrefix . $this->compileValue($this->functions->e($key));
1270 1268
                 }
1271 1269
 
1272
-                $seen =& $this->env->seenNames;
1270
+                $seen = & $this->env->seenNames;
1273 1271
 
1274 1272
                 if (!empty($seen[$key])) {
1275 1273
                     $this->throwError("infinite loop detected: $key");
@@ -1716,7 +1714,7 @@  discard block
 block discarded – undo
1716 1714
                 $name = '@' . $name;
1717 1715
             }
1718 1716
             $parser->count = 0;
1719
-            $parser->buffer = (string)$strValue;
1717
+            $parser->buffer = (string) $strValue;
1720 1718
             if (!$parser->propertyValue($value)) {
1721 1719
                 throw new GeneralException("failed to parse passed in variable $name: $strValue");
1722 1720
             }
@@ -1770,7 +1768,7 @@  discard block
 block discarded – undo
1770 1768
 
1771 1769
         $oldImport = $this->importDir;
1772 1770
 
1773
-        $this->importDir = (array)$this->importDir;
1771
+        $this->importDir = (array) $this->importDir;
1774 1772
         $this->importDir[] = $pi['dirname'] . '/';
1775 1773
 
1776 1774
         $this->addParsedFile($fname);
@@ -1990,12 +1988,12 @@  discard block
 block discarded – undo
1990 1988
 
1991 1989
     public function setImportDir($dirs)
1992 1990
     {
1993
-        $this->importDir = (array)$dirs;
1991
+        $this->importDir = (array) $dirs;
1994 1992
     }
1995 1993
 
1996 1994
     public function addImportDir($dir)
1997 1995
     {
1998
-        $this->importDir = (array)$this->importDir;
1996
+        $this->importDir = (array) $this->importDir;
1999 1997
         $this->importDir[] = $dir;
2000 1998
     }
2001 1999
 
Please login to merge, or discard this patch.