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