| @@ 3639-3646 (lines=8) @@ | ||
| 3636 | * @return static |
|
| 3637 | * <p>(Immutable)</p> |
|
| 3638 | */ |
|
| 3639 | public function removeFirst(): self |
|
| 3640 | { |
|
| 3641 | $tmpArray = $this->getArray(); |
|
| 3642 | ||
| 3643 | \array_shift($tmpArray); |
|
| 3644 | ||
| 3645 | return static::create( |
|
| 3646 | $tmpArray, |
|
| 3647 | $this->iteratorClass, |
|
| 3648 | false |
|
| 3649 | ); |
|
| @@ 3658-3665 (lines=8) @@ | ||
| 3655 | * @return static |
|
| 3656 | * <p>(Immutable)</p> |
|
| 3657 | */ |
|
| 3658 | public function removeLast(): self |
|
| 3659 | { |
|
| 3660 | $tmpArray = $this->getArray(); |
|
| 3661 | ||
| 3662 | \array_pop($tmpArray); |
|
| 3663 | ||
| 3664 | return static::create( |
|
| 3665 | $tmpArray, |
|
| 3666 | $this->iteratorClass, |
|
| 3667 | false |
|
| 3668 | ); |
|
| @@ 3850-3859 (lines=10) @@ | ||
| 3847 | * @return static |
|
| 3848 | * <p>(Immutable)</p> |
|
| 3849 | */ |
|
| 3850 | public function rest(int $from = 1): self |
|
| 3851 | { |
|
| 3852 | $tmpArray = $this->getArray(); |
|
| 3853 | ||
| 3854 | return static::create( |
|
| 3855 | \array_splice($tmpArray, $from), |
|
| 3856 | $this->iteratorClass, |
|
| 3857 | false |
|
| 3858 | ); |
|
| 3859 | } |
|
| 3860 | ||
| 3861 | /** |
|
| 3862 | * @param int $offset |
|