| @@ 93-104 (lines=12) @@ | ||
| 90 | /** |
|
| 91 | * {@inheritdoc} |
|
| 92 | */ |
|
| 93 | public function remove($element) |
|
| 94 | { |
|
| 95 | $key = array_search($element, $this->container); |
|
| 96 | ||
| 97 | if (false === $key) { |
|
| 98 | throw new \OutOfBoundsException('No element found in the collection'); |
|
| 99 | } |
|
| 100 | ||
| 101 | $this->removeKey($key); |
|
| 102 | ||
| 103 | return $this; |
|
| 104 | } |
|
| 105 | ||
| 106 | /** |
|
| 107 | * {@inheritDoc} |
|
| @@ 56-67 (lines=12) @@ | ||
| 53 | /** |
|
| 54 | * {@inheritdoc} |
|
| 55 | */ |
|
| 56 | public function remove($element) |
|
| 57 | { |
|
| 58 | $key = array_search($element, $this->container); |
|
| 59 | ||
| 60 | if (false === $key) { |
|
| 61 | throw new \OutOfBoundsException('No element found in the collection'); |
|
| 62 | } |
|
| 63 | ||
| 64 | $this->removeKey($key); |
|
| 65 | ||
| 66 | return $this; |
|
| 67 | } |
|
| 68 | ||
| 69 | /** |
|
| 70 | * @inheritDoc |
|