Completed
Pull Request — master (#5)
by
unknown
02:59
created
src/LesserPhp/Compiler.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -991,7 +991,7 @@  discard block
 block discarded – undo
991 991
 
992 992
                 $orderedArgs = [];
993 993
                 $keywordArgs = [];
994
-                foreach ((array)$args as $arg) {
994
+                foreach ((array) $args as $arg) {
995 995
                     switch ($arg[0]) {
996 996
                         case "arg":
997 997
                             if (!isset($arg[2])) {
@@ -1088,8 +1088,7 @@  discard block
 block discarded – undo
1088 1088
                 $result = $this->tryImport($importPath, $block, $out);
1089 1089
 
1090 1090
                 $this->env->addImports($importId, $result === false ?
1091
-                    [false, "@import " . $this->compileValue($importPath) . ";"] :
1092
-                    $result);
1091
+                    [false, "@import " . $this->compileValue($importPath) . ";"] : $result);
1093 1092
 
1094 1093
                 break;
1095 1094
             case "import_mixin":
@@ -1322,7 +1321,7 @@  discard block
 block discarded – undo
1322 1321
                     $key = $this->vPrefix . $this->compileValue($this->functions->e($key));
1323 1322
                 }
1324 1323
 
1325
-                $seen =& $this->env->seenNames;
1324
+                $seen = & $this->env->seenNames;
1326 1325
 
1327 1326
                 if (!empty($seen[$key])) {
1328 1327
                     $this->throwError("infinite loop detected: $key");
Please login to merge, or discard this patch.
src/LesserPhp/Compiler/Value/AbstractValue.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
 	public static function factory(Compiler $compiler, Coerce $coerce, array $options, array $value)
55 55
 	{
56 56
 		$nameParts = explode('_', $value[0]);
57
-		$camelCase = array_reduce($nameParts, function($carry, $item){
58
-			return $carry.ucfirst($item);
57
+		$camelCase = array_reduce($nameParts, function($carry, $item) {
58
+			return $carry . ucfirst($item);
59 59
 		}, '');
60
-		$valueClassName = 'LesserPhp\Compiler\Value\\'.$camelCase.'Value';
60
+		$valueClassName = 'LesserPhp\Compiler\Value\\' . $camelCase . 'Value';
61 61
 
62 62
 		if (class_exists($valueClassName)) {
63 63
 			$valueClass = new $valueClassName($compiler, $coerce, $options);
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 			}
69 69
 		}
70 70
 
71
-		throw new \UnexpectedValueException('unknown value type: '.$value[0]);
71
+		throw new \UnexpectedValueException('unknown value type: ' . $value[0]);
72 72
 	}
73 73
 
74 74
 	/**
Please login to merge, or discard this patch.
src/LesserPhp/Compiler/Value/ColorValue.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 		$blue  = round($this->blue);
30 30
 
31 31
 		if ($this->alpha !== null && $this->alpha != 1) {
32
-			return 'rgba('.$red.','.$green.','.$blue.','.$this->alpha.')';
32
+			return 'rgba(' . $red . ',' . $green . ',' . $blue . ',' . $this->alpha . ')';
33 33
 		}
34 34
 
35 35
 		$hex = sprintf("#%02x%02x%02x", $red, $green, $blue);
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 		if ($this->options['compressColors']) {
38 38
 			// Converting hex color to short notation (e.g. #003399 to #039)
39 39
 			if ($hex[1] === $hex[2] && $hex[3] === $hex[4] && $hex[5] === $hex[6]) {
40
-				$hex = '#'.$hex[1].$hex[3].$hex[5];
40
+				$hex = '#' . $hex[1] . $hex[3] . $hex[5];
41 41
 			}
42 42
 		}
43 43
 
Please login to merge, or discard this patch.
src/LesserPhp/Compiler/Value/NumberValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 			$num = round($num, $this->options['numberPrecision']);
30 30
 		}
31 31
 
32
-		return $num.$this->unit;
32
+		return $num . $this->unit;
33 33
 	}
34 34
 
35 35
 	/**
Please login to merge, or discard this patch.
src/LesserPhp/Compiler/Value/FunctionValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 	 */
25 25
 	public function getCompiled()
26 26
 	{
27
-		return $this->name.'('.$this->compiler->compileValue($this->args).')';
27
+		return $this->name . '(' . $this->compiler->compileValue($this->args) . ')';
28 28
 	}
29 29
 
30 30
 	/**
Please login to merge, or discard this patch.
src/LesserPhp/Compiler/Value/StringValue.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 	 */
40 40
 	public function initializeFromOldFormat(array $value)
41 41
 	{
42
-		$this->delimiter=$value[1];
43
-		$this->content=$value[2];
42
+		$this->delimiter = $value[1];
43
+		$this->content = $value[2];
44 44
 	}
45 45
 }
46 46
\ No newline at end of file
Please login to merge, or discard this patch.