@@ -2,19 +2,19 @@ |
||
2 | 2 | |
3 | 3 | namespace IlluminateAgnostic\Arr\Support; |
4 | 4 | |
5 | -use stdClass; |
|
6 | -use Countable; |
|
7 | -use Exception; |
|
8 | 5 | use ArrayAccess; |
9 | -use Traversable; |
|
10 | 6 | use ArrayIterator; |
11 | 7 | use CachingIterator; |
12 | -use JsonSerializable; |
|
13 | -use IteratorAggregate; |
|
8 | +use Countable; |
|
9 | +use Exception; |
|
10 | +use IlluminateAgnostic\Arr\Contracts\Support\Arrayable; |
|
11 | +use IlluminateAgnostic\Arr\Contracts\Support\Jsonable; |
|
14 | 12 | use IlluminateAgnostic\Arr\Support\Debug\Dumper; |
15 | 13 | use IlluminateAgnostic\Arr\Support\Traits\Macroable; |
16 | -use IlluminateAgnostic\Arr\Contracts\Support\Jsonable; |
|
17 | -use IlluminateAgnostic\Arr\Contracts\Support\Arrayable; |
|
14 | +use IteratorAggregate; |
|
15 | +use JsonSerializable; |
|
16 | +use Traversable; |
|
17 | +use stdClass; |
|
18 | 18 | |
19 | 19 | class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate, Jsonable, JsonSerializable |
20 | 20 | { |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | /** |
210 | 210 | * Determine if an item exists in the collection. |
211 | 211 | * |
212 | - * @param mixed $key |
|
212 | + * @param \Closure $key |
|
213 | 213 | * @param mixed $operator |
214 | 214 | * @param mixed $value |
215 | 215 | * @return bool |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | * Filter items by the given key value pair. |
453 | 453 | * |
454 | 454 | * @param string $key |
455 | - * @param mixed $operator |
|
455 | + * @param string $operator |
|
456 | 456 | * @param mixed $value |
457 | 457 | * @return static |
458 | 458 | */ |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | * Get the first item from the collection. |
579 | 579 | * |
580 | 580 | * @param callable|null $callback |
581 | - * @param mixed $default |
|
581 | + * @param stdClass $default |
|
582 | 582 | * @return mixed |
583 | 583 | */ |
584 | 584 | public function first(callable $callback = null, $default = null) |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | /** |
639 | 639 | * Get an item from the collection by key. |
640 | 640 | * |
641 | - * @param mixed $key |
|
641 | + * @param integer $key |
|
642 | 642 | * @param mixed $default |
643 | 643 | * @return mixed |
644 | 644 | */ |
@@ -1234,7 +1234,7 @@ discard block |
||
1234 | 1234 | * Reduce the collection to a single value. |
1235 | 1235 | * |
1236 | 1236 | * @param callable $callback |
1237 | - * @param mixed $initial |
|
1237 | + * @param integer $initial |
|
1238 | 1238 | * @return mixed |
1239 | 1239 | */ |
1240 | 1240 | public function reduce(callable $callback, $initial = null) |
@@ -1245,7 +1245,7 @@ discard block |
||
1245 | 1245 | /** |
1246 | 1246 | * Create a collection of all elements that do not pass a given truth test. |
1247 | 1247 | * |
1248 | - * @param callable|mixed $callback |
|
1248 | + * @param \Closure $callback |
|
1249 | 1249 | * @return static |
1250 | 1250 | */ |
1251 | 1251 | public function reject($callback) |
@@ -1793,7 +1793,7 @@ discard block |
||
1793 | 1793 | * Dynamically access collection proxies. |
1794 | 1794 | * |
1795 | 1795 | * @param string $key |
1796 | - * @return mixed |
|
1796 | + * @return HigherOrderCollectionProxy |
|
1797 | 1797 | * |
1798 | 1798 | * @throws \Exception |
1799 | 1799 | */ |
@@ -3,7 +3,6 @@ |
||
3 | 3 | use IlluminateAgnostic\Arr\Support\Arr; |
4 | 4 | use IlluminateAgnostic\Arr\Support\Collection; |
5 | 5 | use IlluminateAgnostic\Arr\Support\Debug\Dumper; |
6 | -use Illuminate\Support\Collection as IlluminateCollection; |
|
7 | 6 | |
8 | 7 | if (! function_exists('array_add')) { |
9 | 8 | /** |