| @@ 621-631 (lines=11) @@ | ||
| 618 | /** |
|
| 619 | * {@inheritdoc} |
|
| 620 | */ |
|
| 621 | public function shuffle(): CollectionInterface |
|
| 622 | { |
|
| 623 | $values = $this->values; |
|
| 624 | $result = shuffle($values); |
|
| 625 | ||
| 626 | if ($result === false) { |
|
| 627 | throw new RuntimeException('Shuffle operation failed'); |
|
| 628 | } |
|
| 629 | ||
| 630 | return new self($values); |
|
| 631 | } |
|
| 632 | ||
| 633 | /** |
|
| 634 | * {@inheritdoc} |
|
| @@ 699-708 (lines=10) @@ | ||
| 696 | /** |
|
| 697 | * {@inheritdoc} |
|
| 698 | */ |
|
| 699 | public function walk(callable $walker): CollectionInterface |
|
| 700 | { |
|
| 701 | $values = $this->values; |
|
| 702 | ||
| 703 | if (array_walk($values, $walker) === false) { |
|
| 704 | throw new RuntimeException('Walk operation failed'); |
|
| 705 | } |
|
| 706 | ||
| 707 | return new self($values); |
|
| 708 | } |
|
| 709 | ||
| 710 | /** |
|
| 711 | * {@inheritdoc} |
|