Completed
Push — master ( 63f743...cd2958 )
by Hiraku
01:37
created
src/Collection.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
     {
362 362
         return implode("\n", [
363 363
             static::class,
364
-            ' array-mode:' . (int)$this->is_array,
364
+            ' array-mode:' . (int) $this->is_array,
365 365
             " codes:\n  " . implode("\n  ", $this->ops)
366 366
         ]);
367 367
     }
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 
391 391
     private static function evaluate($_seed, $_vars, $_code, $_before, $_after)
392 392
     {
393
-        $_old_handler = set_error_handler(function($severity, $message, $file, $line){
393
+        $_old_handler = set_error_handler(function($severity, $message, $file, $line) {
394 394
             throw new \ErrorException($message, 0, $severity, $file, $line);
395 395
         }, E_ALL ^ E_DEPRECATED ^ E_USER_DEPRECATED);
396 396
         try {
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
         array_unshift(
420 420
             $ops,
421 421
             '$_i = 0;',
422
-            'for (' . implode('; ', $seed). ') {',
422
+            'for (' . implode('; ', $seed) . ') {',
423 423
             '    $_key = $_i;',
424 424
             '    $_ = $_current;',
425 425
             '    ++$_i;'
Please login to merge, or discard this patch.
Doc Comments   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     private $fn_cnt = 0;
22 22
 
23 23
     /**
24
-     * @return \Spindle\Collection
24
+     * @return Collection
25 25
      */
26 26
     public static function from($iterable, $debug = null)
27 27
     {
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      * @param int|string $end
35 35
      * @param int $step
36 36
      * @param bool $debug
37
-     * @return \Spindle\Collection
37
+     * @return Collection
38 38
      */
39 39
     public static function range($start, $end, $step = 1, $debug = null)
40 40
     {
@@ -80,6 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
     /**
82 82
      * @param iterable $seed
83
+     * @param string $type
83 84
      */
84 85
     public function __construct($seed, $debug = null, $type = null)
85 86
     {
@@ -146,7 +147,7 @@  discard block
 block discarded – undo
146 147
     }
147 148
 
148 149
     /**
149
-     * @return \Spindle\Collection (new instance)
150
+     * @return Collection (new instance)
150 151
      */
151 152
     public function flip()
152 153
     {
@@ -262,6 +263,11 @@  discard block
 block discarded – undo
262 263
         ];
263 264
     }
264 265
 
266
+    /**
267
+     * @param string $_code
268
+     * @param string $_before
269
+     * @param string $_after
270
+     */
265 271
     private static function evaluate($_seed, $_vars, $_code, $_before, $_after)
266 272
     {
267 273
         $_old_handler = set_error_handler(function($severity, $message, $file, $line){
Please login to merge, or discard this patch.
src/Traits/TerminateTrait.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 
39 39
     /**
40 40
      * @param string|callable $fn '$_carry + $_'
41
-     * @param mixed $initial
41
+     * @param integer $initial
42 42
      * @return mixed
43 43
      */
44 44
     public function reduce($fn, $initial = null)
Please login to merge, or discard this patch.
src/Traits/SortTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
     public function usortStable(callable $cmp)
43 43
     {
44 44
         $array = $this->map('[$_, $_i]')->toArray();
45
-        usort($array, static function ($a, $b) use ($cmp) {
45
+        usort($array, static function($a, $b) use ($cmp) {
46 46
             return $cmp($a[0], $b[0]) ?: ($a[1] - $b[1]);
47 47
         });
48 48
         $sorted = new $this($array, $this->debug);
Please login to merge, or discard this patch.