| @@ 256-263 (lines=8) @@ | ||
| 253 | * |
|
| 254 | * @return Storage |
|
| 255 | */ |
|
| 256 | public function removeItem(Item $item) |
|
| 257 | { |
|
| 258 | if ($this->items->contains($item)) { |
|
| 259 | $this->items->removeElement($item); |
|
| 260 | $item->setStorage(null); |
|
| 261 | } |
|
| 262 | ||
| 263 | return $this; |
|
| 264 | } |
|
| 265 | ||
| 266 | /** |
|
| @@ 241-248 (lines=8) @@ | ||
| 238 | * |
|
| 239 | * @return Storage |
|
| 240 | */ |
|
| 241 | public function addItem(Item $item) |
|
| 242 | { |
|
| 243 | if (!$this->items->contains($item)) { |
|
| 244 | $this->items->add($item); |
|
| 245 | $item->setStorage($this); |
|
| 246 | } |
|
| 247 | ||
| 248 | return $this; |
|
| 249 | } |
|
| 250 | ||
| 251 | /** |
|