| @@ 3796-3803 (lines=8) @@ | ||
| 3793 | * @return static |
|
| 3794 | * <p>(Immutable)</p> |
|
| 3795 | */ |
|
| 3796 | public function removeFirst(): self |
|
| 3797 | { |
|
| 3798 | $tmpArray = $this->getArray(); |
|
| 3799 | ||
| 3800 | \array_shift($tmpArray); |
|
| 3801 | ||
| 3802 | return static::create( |
|
| 3803 | $tmpArray, |
|
| 3804 | $this->iteratorClass, |
|
| 3805 | false |
|
| 3806 | ); |
|
| @@ 3815-3822 (lines=8) @@ | ||
| 3812 | * @return static |
|
| 3813 | * <p>(Immutable)</p> |
|
| 3814 | */ |
|
| 3815 | public function removeLast(): self |
|
| 3816 | { |
|
| 3817 | $tmpArray = $this->getArray(); |
|
| 3818 | ||
| 3819 | \array_pop($tmpArray); |
|
| 3820 | ||
| 3821 | return static::create( |
|
| 3822 | $tmpArray, |
|
| 3823 | $this->iteratorClass, |
|
| 3824 | false |
|
| 3825 | ); |
|
| @@ 4004-4013 (lines=10) @@ | ||
| 4001 | * @return static |
|
| 4002 | * <p>(Immutable)</p> |
|
| 4003 | */ |
|
| 4004 | public function rest(int $from = 1): self |
|
| 4005 | { |
|
| 4006 | $tmpArray = $this->getArray(); |
|
| 4007 | ||
| 4008 | return static::create( |
|
| 4009 | \array_splice($tmpArray, $from), |
|
| 4010 | $this->iteratorClass, |
|
| 4011 | false |
|
| 4012 | ); |
|
| 4013 | } |
|
| 4014 | ||
| 4015 | /** |
|
| 4016 | * Return the array in the reverse order. |
|