| @@ 4830-4841 (lines=12) @@ | ||
| 4827 | * @psalm-return static<TKey,T>  | 
                                |
| 4828 | * @psalm-mutation-free  | 
                                |
| 4829 | */  | 
                                |
| 4830 | public function removeFirst(): self  | 
                                |
| 4831 |     { | 
                                |
| 4832 | $tmpArray = $this->toArray();  | 
                                |
| 4833 | ||
| 4834 | \array_shift($tmpArray);  | 
                                |
| 4835 | ||
| 4836 | return static::create(  | 
                                |
| 4837 | $tmpArray,  | 
                                |
| 4838 | $this->iteratorClass,  | 
                                |
| 4839 | false  | 
                                |
| 4840 | );  | 
                                |
| 4841 | }  | 
                                |
| 4842 | ||
| 4843 | /**  | 
                                |
| 4844 | * Remove the last value from the current array.  | 
                                |
| @@ 4852-4863 (lines=12) @@ | ||
| 4849 | * @psalm-return static<TKey,T>  | 
                                |
| 4850 | * @psalm-mutation-free  | 
                                |
| 4851 | */  | 
                                |
| 4852 | public function removeLast(): self  | 
                                |
| 4853 |     { | 
                                |
| 4854 | $tmpArray = $this->toArray();  | 
                                |
| 4855 | ||
| 4856 | \array_pop($tmpArray);  | 
                                |
| 4857 | ||
| 4858 | return static::create(  | 
                                |
| 4859 | $tmpArray,  | 
                                |
| 4860 | $this->iteratorClass,  | 
                                |
| 4861 | false  | 
                                |
| 4862 | );  | 
                                |
| 4863 | }  | 
                                |
| 4864 | ||
| 4865 | /**  | 
                                |
| 4866 | * Removes a particular value from an array (numeric or associative).  | 
                                |
| @@ 5079-5088 (lines=10) @@ | ||
| 5076 | * @psalm-return static<TKey,T>  | 
                                |
| 5077 | * @psalm-mutation-free  | 
                                |
| 5078 | */  | 
                                |
| 5079 | public function rest(int $from = 1): self  | 
                                |
| 5080 |     { | 
                                |
| 5081 | $tmpArray = $this->toArray();  | 
                                |
| 5082 | ||
| 5083 | return static::create(  | 
                                |
| 5084 | \array_splice($tmpArray, $from),  | 
                                |
| 5085 | $this->iteratorClass,  | 
                                |
| 5086 | false  | 
                                |
| 5087 | );  | 
                                |
| 5088 | }  | 
                                |
| 5089 | ||
| 5090 | /**  | 
                                |
| 5091 | * Return the array in the reverse order.  | 
                                |