| @@ 2895-2901 (lines=7) @@ | ||
| 2892 | * @return static |
|
| 2893 | * <p>(Immutable)</p> |
|
| 2894 | */ |
|
| 2895 | public function removeFirst(): self |
|
| 2896 | { |
|
| 2897 | $tmpArray = $this->array; |
|
| 2898 | \array_shift($tmpArray); |
|
| 2899 | ||
| 2900 | return static::create($tmpArray, $this->iteratorClass, false); |
|
| 2901 | } |
|
| 2902 | ||
| 2903 | /** |
|
| 2904 | * Remove the last value from the current array. |
|
| @@ 2909-2915 (lines=7) @@ | ||
| 2906 | * @return static |
|
| 2907 | * <p>(Immutable)</p> |
|
| 2908 | */ |
|
| 2909 | public function removeLast(): self |
|
| 2910 | { |
|
| 2911 | $tmpArray = $this->array; |
|
| 2912 | \array_pop($tmpArray); |
|
| 2913 | ||
| 2914 | return static::create($tmpArray, $this->iteratorClass, false); |
|
| 2915 | } |
|
| 2916 | ||
| 2917 | /** |
|
| 2918 | * Removes a particular value from an array (numeric or associative). |
|
| @@ 3081-3090 (lines=10) @@ | ||
| 3078 | * @return static |
|
| 3079 | * <p>(Immutable)</p> |
|
| 3080 | */ |
|
| 3081 | public function rest(int $from = 1): self |
|
| 3082 | { |
|
| 3083 | $tmpArray = $this->array; |
|
| 3084 | ||
| 3085 | return static::create( |
|
| 3086 | \array_splice($tmpArray, $from), |
|
| 3087 | $this->iteratorClass, |
|
| 3088 | false |
|
| 3089 | ); |
|
| 3090 | } |
|
| 3091 | ||
| 3092 | /** |
|
| 3093 | * Return the array in the reverse order. |
|