| @@ 159-167 (lines=9) @@ | ||
| 156 | return new self($items); |
|
| 157 | } |
|
| 158 | ||
| 159 | public function remove($value): self |
|
| 160 | { |
|
| 161 | $items = $this->items; |
|
| 162 | $key = $this->search($value); |
|
| 163 | ||
| 164 | unset($items[$key]); |
|
| 165 | ||
| 166 | return new self($items); |
|
| 167 | } |
|
| 168 | ||
| 169 | public function removeAll($value): self |
|
| 170 | { |
|
| @@ 116-124 (lines=9) @@ | ||
| 113 | return new self($items); |
|
| 114 | } |
|
| 115 | ||
| 116 | public function remove($value): self |
|
| 117 | { |
|
| 118 | $items = $this->items; |
|
| 119 | $index = $this->search($value); |
|
| 120 | ||
| 121 | unset($items[$index]); |
|
| 122 | ||
| 123 | return new self($items); |
|
| 124 | } |
|
| 125 | ||
| 126 | public function removeAll($value): self |
|
| 127 | { |
|