| @@ -47,9 +47,9 @@ | ||
| 47 | 47 | * @param callable|null $callback |
| 48 | 48 | * |
| 49 | 49 | * @return $this |
| 50 | 50 | */ |
| 51 | - public function filter( ?callable $callback = null ) { | |
| 51 | + public function filter( callable $callback = null ) { | |
| 52 | 52 | if ( ! $callback ) { |
| 53 | 53 | return new static( array_filter( $this->items ) ); |
| 54 | 54 | } |
| 55 | 55 | |
| @@ -123,9 +123,9 @@ | ||
| 123 | 123 | |
| 124 | 124 | /** |
| 125 | 125 | * Run a map over each of the items. |
| 126 | 126 | * |
| 127 | - * @param callable $callback | |
| 127 | + * @param callable $callback | |
| 128 | 128 | * @return $this |
| 129 | 129 | */ |
| 130 | 130 | public function map( callable $callback ) { |
| 131 | 131 | $keys = array_keys( $this->items ); |
| @@ -452,12 +452,8 @@ | ||
| 452 | 452 | |
| 453 | 453 | return new static( $result ); |
| 454 | 454 | } |
| 455 | 455 | |
| 456 | - public function flip() { | |
| 457 | - return new static( array_flip( $this->items ) ); | |
| 458 | - } | |
| 459 | - | |
| 460 | 456 | /** |
| 461 | 457 | * @param array ...$values |
| 462 | 458 | * |
| 463 | 459 | * @return $this |
| @@ -483,18 +479,8 @@ | ||
| 483 | 479 | } |
| 484 | 480 | } |
| 485 | 481 | |
| 486 | 482 | return false; |
| 487 | - } | |
| 488 | - | |
| 489 | - public function every( callable $callback ) { | |
| 490 | - foreach ( $this->items as $key => $item ) { | |
| 491 | - if ( ! $callback( $item, $key ) ) { | |
| 492 | - return false; | |
| 493 | - } | |
| 494 | - } | |
| 495 | - | |
| 496 | - return true; | |
| 497 | 483 | } |
| 498 | 484 | |
| 499 | 485 | /** |
| 500 | 486 | * @param mixed $offset |