| @@ 4084-4091 (lines=8) @@ | ||
| 4081 | * |
|
| 4082 | * @psalm-return static<TKey,T> |
|
| 4083 | */ |
|
| 4084 | public function removeFirst(): self |
|
| 4085 | { |
|
| 4086 | $tmpArray = $this->getArray(); |
|
| 4087 | ||
| 4088 | \array_shift($tmpArray); |
|
| 4089 | ||
| 4090 | return static::create( |
|
| 4091 | $tmpArray, |
|
| 4092 | $this->iteratorClass, |
|
| 4093 | false |
|
| 4094 | ); |
|
| @@ 4105-4112 (lines=8) @@ | ||
| 4102 | * |
|
| 4103 | * @psalm-return static<TKey,T> |
|
| 4104 | */ |
|
| 4105 | public function removeLast(): self |
|
| 4106 | { |
|
| 4107 | $tmpArray = $this->getArray(); |
|
| 4108 | ||
| 4109 | \array_pop($tmpArray); |
|
| 4110 | ||
| 4111 | return static::create( |
|
| 4112 | $tmpArray, |
|
| 4113 | $this->iteratorClass, |
|
| 4114 | false |
|
| 4115 | ); |
|
| @@ 4316-4325 (lines=10) @@ | ||
| 4313 | * |
|
| 4314 | * @psalm-return static<TKey,T> |
|
| 4315 | */ |
|
| 4316 | public function rest(int $from = 1): self |
|
| 4317 | { |
|
| 4318 | $tmpArray = $this->getArray(); |
|
| 4319 | ||
| 4320 | return static::create( |
|
| 4321 | \array_splice($tmpArray, $from), |
|
| 4322 | $this->iteratorClass, |
|
| 4323 | false |
|
| 4324 | ); |
|
| 4325 | } |
|
| 4326 | ||
| 4327 | /** |
|
| 4328 | * Return the array in the reverse order. |
|