| 1 | <?php |
||
| 9 | final class ProductCollection |
||
| 10 | { |
||
| 11 | /** @var Product[] */ |
||
| 12 | private $collection = []; |
||
| 13 | |||
| 14 | 3 | public function __construct(?array $products = []) |
|
| 20 | |||
| 21 | 2 | public function add(Product $product): void |
|
| 25 | |||
| 26 | 1 | public function remove(Product $product): void |
|
| 30 | |||
| 31 | 1 | public function get(UuidInterface $key): Product |
|
| 35 | |||
| 36 | /** @return Product[] */ |
||
| 37 | 2 | public function getAll(): array |
|
| 41 | } |
||
| 42 |