| @@ 121-136 (lines=16) @@ | ||
| 118 | /** |
|
| 119 | * @inheritdoc |
|
| 120 | */ |
|
| 121 | public function searchAll(Equatable $value) |
|
| 122 | { |
|
| 123 | $foundKeys = []; |
|
| 124 | ||
| 125 | foreach ($this->items as $index => $item) { |
|
| 126 | if ($item->equals($value)) { |
|
| 127 | $foundKeys[] = $index; |
|
| 128 | } |
|
| 129 | } |
|
| 130 | ||
| 131 | if (!$foundKeys) { |
|
| 132 | throw OutOfRangeException::valueOutOfRange($value); |
|
| 133 | } |
|
| 134 | ||
| 135 | return $foundKeys; |
|
| 136 | } |
|
| 137 | ||
| 138 | /** |
|
| 139 | * @inheritdoc |
|
| @@ 117-132 (lines=16) @@ | ||
| 114 | /** |
|
| 115 | * @inheritdoc |
|
| 116 | */ |
|
| 117 | public function searchAll(Equatable $value) |
|
| 118 | { |
|
| 119 | $foundKeys = []; |
|
| 120 | ||
| 121 | foreach ($this->items as $index => $item) { |
|
| 122 | if ($item->equals($value)) { |
|
| 123 | $foundKeys[] = $index; |
|
| 124 | } |
|
| 125 | } |
|
| 126 | ||
| 127 | if (!$foundKeys) { |
|
| 128 | throw OutOfRangeException::valueOutOfRange($value); |
|
| 129 | } |
|
| 130 | ||
| 131 | return $foundKeys; |
|
| 132 | } |
|
| 133 | ||
| 134 | /** |
|
| 135 | * @inheritdoc |
|