| @@ 25-34 (lines=10) @@ | ||
| 22 | /** |
|
| 23 | * @param Equatable[] $items |
|
| 24 | */ |
|
| 25 | public function __construct(array $items = []) |
|
| 26 | { |
|
| 27 | foreach ($items as $key => $value) { |
|
| 28 | if (!$value instanceof Equatable) { |
|
| 29 | throw InvalidArgumentException::invalidTypeInArray('items', Equatable::class, $value); |
|
| 30 | } |
|
| 31 | ||
| 32 | $this->items[$key] = $value; |
|
| 33 | } |
|
| 34 | } |
|
| 35 | ||
| 36 | public function __clone() |
|
| 37 | { |
|
| @@ 25-34 (lines=10) @@ | ||
| 22 | /** |
|
| 23 | * @param Equatable[] $items |
|
| 24 | */ |
|
| 25 | public function __construct(array $items = []) |
|
| 26 | { |
|
| 27 | foreach ($items as $item) { |
|
| 28 | if (!$item instanceof Equatable) { |
|
| 29 | throw InvalidArgumentException::invalidTypeInArray('items', Equatable::class, $item); |
|
| 30 | } |
|
| 31 | ||
| 32 | $this->items[] = $item; |
|
| 33 | } |
|
| 34 | } |
|
| 35 | ||
| 36 | public function __clone() |
|
| 37 | { |
|