@@ 107-116 (lines=10) @@ | ||
104 | /** |
|
105 | * @inheritdoc |
|
106 | */ |
|
107 | public function search(Equatable $value) |
|
108 | { |
|
109 | foreach ($this->items as $key => $item) { |
|
110 | if ($item->equals($value)) { |
|
111 | return $key; |
|
112 | } |
|
113 | } |
|
114 | ||
115 | throw OutOfRangeException::valueOutOfRange($value); |
|
116 | } |
|
117 | ||
118 | /** |
|
119 | * @inheritdoc |
@@ 103-112 (lines=10) @@ | ||
100 | /** |
|
101 | * @inheritdoc |
|
102 | */ |
|
103 | public function search(Equatable $value) |
|
104 | { |
|
105 | foreach ($this->items as $index => $item) { |
|
106 | if ($item->equals($value)) { |
|
107 | return $index; |
|
108 | } |
|
109 | } |
|
110 | ||
111 | throw OutOfRangeException::valueOutOfRange($value); |
|
112 | } |
|
113 | ||
114 | /** |
|
115 | * @inheritdoc |