@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | private $fn_cnt = 0; |
23 | 23 | |
24 | 24 | /** |
25 | - * @return \Spindle\Collection |
|
25 | + * @return Collection |
|
26 | 26 | */ |
27 | 27 | public static function from($iterable, $debug = null) |
28 | 28 | { |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * @param int|string $end |
36 | 36 | * @param int $step |
37 | 37 | * @param bool $debug |
38 | - * @return \Spindle\Collection |
|
38 | + * @return Collection |
|
39 | 39 | */ |
40 | 40 | public static function range($start, $end, $step = 1, $debug = null) |
41 | 41 | { |
@@ -81,6 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | /** |
83 | 83 | * @param iterable $seed |
84 | + * @param string $type |
|
84 | 85 | */ |
85 | 86 | public function __construct($seed, $debug = null, $type = null) |
86 | 87 | { |
@@ -215,6 +216,11 @@ discard block |
||
215 | 216 | ]; |
216 | 217 | } |
217 | 218 | |
219 | + /** |
|
220 | + * @param string $_code |
|
221 | + * @param string $_before |
|
222 | + * @param string $_after |
|
223 | + */ |
|
218 | 224 | private static function evaluate($_seed, $_vars, $_code, $_before, $_after) |
219 | 225 | { |
220 | 226 | set_error_handler(function($severity, $message, $file, $line){ |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | { |
189 | 189 | return implode("\n", [ |
190 | 190 | static::class, |
191 | - ' array-mode:' . (int)$this->is_array, |
|
191 | + ' array-mode:' . (int) $this->is_array, |
|
192 | 192 | " codes:\n " . implode("\n ", $this->ops) |
193 | 193 | ]); |
194 | 194 | } |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | |
218 | 218 | private static function evaluate($_seed, $_vars, $_code, $_before, $_after) |
219 | 219 | { |
220 | - set_error_handler(function($severity, $message, $file, $line){ |
|
220 | + set_error_handler(function($severity, $message, $file, $line) { |
|
221 | 221 | throw new \ErrorException($message, 0, $severity, $file, $line); |
222 | 222 | }, E_ALL ^ E_DEPRECATED ^ E_USER_DEPRECATED); |
223 | 223 | try { |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | array_unshift( |
247 | 247 | $ops, |
248 | 248 | '$_i = 0;', |
249 | - 'for (' . implode('; ', $seed). ') {', |
|
249 | + 'for (' . implode('; ', $seed) . ') {', |
|
250 | 250 | ' $_key = $_i;', |
251 | 251 | ' $_ = $_current;', |
252 | 252 | ' ++$_i;' |