Passed
Push — master ( 9a86cf...630b88 )
by Marcus
02:50
created
src/LesserPhp/Compiler.php 2 patches
Spacing   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -882,7 +882,7 @@  discard block
 block discarded – undo
882 882
 
883 883
                 $orderedArgs = [];
884 884
                 $keywordArgs = [];
885
-                foreach ((array)$args as $arg) {
885
+                foreach ((array) $args as $arg) {
886 886
                     switch ($arg[0]) {
887 887
                         case "arg":
888 888
                             if (!isset($arg[2])) {
@@ -979,8 +979,7 @@  discard block
 block discarded – undo
979 979
                 $result = $this->tryImport($importPath, $block, $out);
980 980
 
981 981
                 $this->env->addImports($importId, $result === false ?
982
-                    [false, "@import " . $this->compileValue($importPath) . ";"] :
983
-                    $result);
982
+                    [false, "@import " . $this->compileValue($importPath) . ";"] : $result);
984 983
 
985 984
                 break;
986 985
             case "import_mixin":
@@ -1102,7 +1101,7 @@  discard block
 block discarded – undo
1102 1101
         }
1103 1102
         list($color, $delta) = $args[2];
1104 1103
         $color = $this->assertions->assertColor($color);
1105
-        $delta = (float)$delta[1];
1104
+        $delta = (float) $delta[1];
1106 1105
 
1107 1106
         return [$color, $delta];
1108 1107
     }
@@ -1129,7 +1128,7 @@  discard block
 block discarded – undo
1129 1128
             $i = 0;
1130 1129
             foreach ($rawComponents as $c) {
1131 1130
                 $val = $this->reduce($c);
1132
-                $val = isset($val[1]) ? (float)$val[1] : 0;
1131
+                $val = isset($val[1]) ? (float) $val[1] : 0;
1133 1132
 
1134 1133
                 if ($i === 0) {
1135 1134
                     $clamp = 360;
@@ -1158,13 +1157,13 @@  discard block
 block discarded – undo
1158 1157
                     if ($c[0] === "number" && $c[2] === "%") {
1159 1158
                         $components[] = 255 * ($c[1] / 100);
1160 1159
                     } else {
1161
-                        $components[] = (float)$c[1];
1160
+                        $components[] = (float) $c[1];
1162 1161
                     }
1163 1162
                 } elseif ($i === 4) {
1164 1163
                     if ($c[0] === "number" && $c[2] === "%") {
1165 1164
                         $components[] = 1.0 * ($c[1] / 100);
1166 1165
                     } else {
1167
-                        $components[] = (float)$c[1];
1166
+                        $components[] = (float) $c[1];
1168 1167
                     }
1169 1168
                 } else {
1170 1169
                     break;
@@ -1213,7 +1212,7 @@  discard block
 block discarded – undo
1213 1212
                     $key = $this->vPrefix . $this->compileValue($this->functions->e($key));
1214 1213
                 }
1215 1214
 
1216
-                $seen =& $this->env->seenNames;
1215
+                $seen = & $this->env->seenNames;
1217 1216
 
1218 1217
                 if (!empty($seen[$key])) {
1219 1218
                     $this->throwError("infinite loop detected: $key");
@@ -1660,7 +1659,7 @@  discard block
 block discarded – undo
1660 1659
                 $name = '@' . $name;
1661 1660
             }
1662 1661
             $parser->count = 0;
1663
-            $parser->buffer = (string)$strValue;
1662
+            $parser->buffer = (string) $strValue;
1664 1663
             if (!$parser->propertyValue($value)) {
1665 1664
                 throw new GeneralException("failed to parse passed in variable $name: $strValue");
1666 1665
             }
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     /**
182 182
      * attempts to find the path of an import url, returns null for css files
183 183
      *
184
-     * @param $url
184
+     * @param string $url
185 185
      *
186 186
      * @return null|string
187 187
      */
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
 
446 446
     /**
447 447
      * @param $block
448
-     * @param $selectors
448
+     * @param string[] $selectors
449 449
      */
450 450
     protected function compileNestedBlock($block, $selectors)
451 451
     {
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
 
473 473
     /**
474 474
      * @param $block
475
-     * @param $out
475
+     * @param \stdClass $out
476 476
      *
477 477
      * @throws \LesserPhp\Exception\GeneralException
478 478
      */
@@ -1493,7 +1493,7 @@  discard block
 block discarded – undo
1493 1493
     }
1494 1494
 
1495 1495
     /**
1496
-     * @param $a
1496
+     * @param boolean $a
1497 1497
      *
1498 1498
      * @return array
1499 1499
      */
@@ -1767,7 +1767,7 @@  discard block
 block discarded – undo
1767 1767
     }
1768 1768
 
1769 1769
     /**
1770
-     * @param      $parent
1770
+     * @param      NodeEnv $parent
1771 1771
      * @param null $block
1772 1772
      *
1773 1773
      * @return \LesserPhp\NodeEnv
@@ -1875,7 +1875,7 @@  discard block
 block discarded – undo
1875 1875
     /**
1876 1876
      * inject array of unparsed strings into environment as variables
1877 1877
      *
1878
-     * @param array $args
1878
+     * @param string[] $args
1879 1879
      *
1880 1880
      * @throws \LesserPhp\Exception\GeneralException
1881 1881
      */
Please login to merge, or discard this patch.
src/LesserPhp/Color/Converter.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
      * @param int $max
140 140
      * @param int $min
141 141
      *
142
-     * @return mixed
142
+     * @return integer
143 143
      */
144 144
     public function clamp($v, $max = 1, $min = 0)
145 145
     {
Please login to merge, or discard this patch.
src/LesserPhp/Parser.php 1 patch
Doc Comments   +27 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      * Parser constructor.
100 100
      *
101 101
      * @param \LesserPhp\Compiler $lessc
102
-     * @param null                $sourceName
102
+     * @param string                $sourceName
103 103
      */
104 104
     public function __construct(Compiler $lessc, $sourceName = null)
105 105
     {
@@ -123,6 +123,9 @@  discard block
 block discarded – undo
123 123
         }
124 124
     }
125 125
 
126
+    /**
127
+     * @param string $buffer
128
+     */
126 129
     public function parse($buffer)
127 130
     {
128 131
         $this->count = 0;
@@ -487,6 +490,7 @@  discard block
 block discarded – undo
487 490
 
488 491
     /**
489 492
      * recursively parse infix equation with $lhs at precedence $minP
493
+     * @param integer $minP
490 494
      */
491 495
     protected function expHelper($lhs, $minP)
492 496
     {
@@ -779,6 +783,11 @@  discard block
 block discarded – undo
779 783
     }
780 784
 
781 785
     // an unbounded string stopped by $end
786
+
787
+    /**
788
+     * @param string $end
789
+     * @param string[] $rejectStrs
790
+     */
782 791
     protected function openString($end, &$out, $nestingOpen = null, $rejectStrs = null)
783 792
     {
784 793
         $oldWhite = $this->eatWhiteDefault;
@@ -1433,6 +1442,9 @@  discard block
 block discarded – undo
1433 1442
 
1434 1443
     /* raw parsing functions */
1435 1444
 
1445
+    /**
1446
+     * @param boolean $eatWhitespace
1447
+     */
1436 1448
     protected function literal($what, $eatWhitespace = null)
1437 1449
     {
1438 1450
         if ($eatWhitespace === null) {
@@ -1460,6 +1472,9 @@  discard block
 block discarded – undo
1460 1472
         return $this->match(self::$literalCache[$what], $m, $eatWhitespace);
1461 1473
     }
1462 1474
 
1475
+    /**
1476
+     * @param string $parseItem
1477
+     */
1463 1478
     protected function genericList(&$out, $parseItem, $delim = "", $flatten = true)
1464 1479
     {
1465 1480
         $s = $this->seek();
@@ -1553,6 +1568,10 @@  discard block
 block discarded – undo
1553 1568
     }
1554 1569
 
1555 1570
     // match something without consuming it
1571
+
1572
+    /**
1573
+     * @param string $regex
1574
+     */
1556 1575
     protected function peek($regex, &$out = null, $from = null)
1557 1576
     {
1558 1577
         if ($from === null) {
@@ -1576,6 +1595,9 @@  discard block
 block discarded – undo
1576 1595
 
1577 1596
     /* misc functions */
1578 1597
 
1598
+    /**
1599
+     * @param integer $count
1600
+     */
1579 1601
     public function throwError($msg = "parse error", $count = null)
1580 1602
     {
1581 1603
         $count = $count === null ? $this->count : $count;
@@ -1625,6 +1647,10 @@  discard block
 block discarded – undo
1625 1647
     }
1626 1648
 
1627 1649
     // push a block that doesn't multiply tags
1650
+
1651
+    /**
1652
+     * @param string $type
1653
+     */
1628 1654
     protected function pushSpecialBlock($type)
1629 1655
     {
1630 1656
         return $this->pushBlock(null, $type);
Please login to merge, or discard this patch.