@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | * |
553 | 553 | * @param array $items Any number of arguments will be pushed onto the |
554 | 554 | * |
555 | - * @return mixed The first item in this collection |
|
555 | + * @return AbstractCollection The first item in this collection |
|
556 | 556 | */ |
557 | 557 | public function push(...$items) |
558 | 558 | { |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | * |
567 | 567 | * Returns a new collection with $items added. |
568 | 568 | * |
569 | - * @return mixed The first item in this collection |
|
569 | + * @return AbstractCollection The first item in this collection |
|
570 | 570 | */ |
571 | 571 | public function unshift(...$items) |
572 | 572 | { |
@@ -628,7 +628,7 @@ discard block |
||
628 | 628 | /** |
629 | 629 | * Iterate over each item that matches criteria in callback. |
630 | 630 | * |
631 | - * @param Closure|callable $callback A callback to use |
|
631 | + * @param Closure $callback A callback to use |
|
632 | 632 | * @param object $bindTo The object to bind to |
633 | 633 | * |
634 | 634 | * @return AbstractCollection |
@@ -745,7 +745,7 @@ discard block |
||
745 | 745 | /** |
746 | 746 | * Returns collection in reverse order. |
747 | 747 | * |
748 | - * @param null $preserveKeys True if you want to preserve collection's keys |
|
748 | + * @param boolean $preserveKeys True if you want to preserve collection's keys |
|
749 | 749 | * |
750 | 750 | * @return AbstractCollection This collection in reverse order. |
751 | 751 | */ |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | return $this->data[$index]; |
289 | 289 | } |
290 | 290 | if ($throw) { |
291 | - throw new OutOfBoundsException(__CLASS__ . ' could not find value at index ' . $index); |
|
291 | + throw new OutOfBoundsException(__CLASS__.' could not find value at index '.$index); |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | return $default; |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | unset($this->data[$index]); |
330 | 330 | } else { |
331 | 331 | if ($throw) { |
332 | - throw new OutOfBoundsException('No value found at given index: ' . $index); |
|
332 | + throw new OutOfBoundsException('No value found at given index: '.$index); |
|
333 | 333 | } |
334 | 334 | } |
335 | 335 | |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | */ |
485 | 485 | public function contains($value, $index = null) |
486 | 486 | { |
487 | - return (bool) $this->first(function ($val, $key) use ($value, $index) { |
|
487 | + return (bool) $this->first(function($val, $key) use ($value, $index) { |
|
488 | 488 | if (is_callable($value)) { |
489 | 489 | $found = $value($val, $key); |
490 | 490 | } else { |
@@ -516,11 +516,11 @@ discard block |
||
516 | 516 | public function duplicates() |
517 | 517 | { |
518 | 518 | $dups = []; |
519 | - $this->walk(function ($val, $key) use (&$dups) { |
|
519 | + $this->walk(function($val, $key) use (&$dups) { |
|
520 | 520 | $dups[$val][] = $key; |
521 | 521 | }); |
522 | 522 | |
523 | - return static::factory($dups)->filter(function ($val) { |
|
523 | + return static::factory($dups)->filter(function($val) { |
|
524 | 524 | return count($val) > 1; |
525 | 525 | }); |
526 | 526 | } |
@@ -662,7 +662,7 @@ discard block |
||
662 | 662 | public function pairs() |
663 | 663 | { |
664 | 664 | return static::factory(array_map( |
665 | - function ($key, $val) { |
|
665 | + function($key, $val) { |
|
666 | 666 | return [$key, $val]; |
667 | 667 | }, |
668 | 668 | array_keys($this->data), |
@@ -871,7 +871,7 @@ discard block |
||
871 | 871 | } |
872 | 872 | } |
873 | 873 | // if row contains an array it isn't tabular |
874 | - if (array_reduce($row, function ($carry, $item) { |
|
874 | + if (array_reduce($row, function($carry, $item) { |
|
875 | 875 | return is_array($item) && $carry; |
876 | 876 | }, true)) { |
877 | 877 | return false; |
@@ -980,7 +980,7 @@ discard block |
||
980 | 980 | protected function assertCorrectInputDataType($data) |
981 | 981 | { |
982 | 982 | if (!$this->isConsistentDataStructure($data)) { |
983 | - throw new InvalidArgumentException(__CLASS__ . ' expected traversable data, got: ' . gettype($data)); |
|
983 | + throw new InvalidArgumentException(__CLASS__.' expected traversable data, got: '.gettype($data)); |
|
984 | 984 | } |
985 | 985 | } |
986 | 986 |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | return call_user_func_array([$column, $method], $args); |
38 | 38 | } |
39 | 39 | } |
40 | - throw new BadMethodCallException('Method does not exist: ' . __CLASS__ . "::{$method}()"); |
|
40 | + throw new BadMethodCallException('Method does not exist: '.__CLASS__."::{$method}()"); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | return static::factory($values); |
74 | 74 | } |
75 | 75 | if ($throw) { |
76 | - throw new OutOfBoundsException(__CLASS__ . ' could not find column: ' . $column); |
|
76 | + throw new OutOfBoundsException(__CLASS__.' could not find column: '.$column); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | return false; |
@@ -80,17 +80,17 @@ |
||
80 | 80 | $trace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 1); |
81 | 81 | $label = 'File: '; |
82 | 82 | $label .= pathinfo($trace[0]['file'], PATHINFO_FILENAME); |
83 | - $label .= ':' . $trace[0]['line']; |
|
84 | - echo $label . "\n"; |
|
83 | + $label .= ':'.$trace[0]['line']; |
|
84 | + echo $label."\n"; |
|
85 | 85 | } else { |
86 | - echo $label . "\n" . implode( |
|
86 | + echo $label."\n".implode( |
|
87 | 87 | array_map( |
88 | - function ($c) { |
|
88 | + function($c) { |
|
89 | 89 | return '-'; |
90 | 90 | }, |
91 | 91 | str_split($label) |
92 | 92 | ) |
93 | - ) . "\n"; |
|
93 | + )."\n"; |
|
94 | 94 | } |
95 | 95 | var_dump($input); |
96 | 96 | echo "\n"; |