1 | <?php |
||
15 | class CellCollection extends AbstractCollection implements CellCollectionInterface |
||
16 | { |
||
17 | const MINIMUM_CELLS = 2; |
||
18 | |||
19 | /** |
||
20 | * @inheritDoc |
||
21 | */ |
||
22 | 13 | protected function isItemValid($item): bool |
|
26 | |||
27 | /** |
||
28 | * @inheritdoc |
||
29 | */ |
||
30 | 8 | public function getIterator(): \Iterator |
|
36 | |||
37 | /** |
||
38 | * @inheritdoc |
||
39 | */ |
||
40 | 4 | public function getCells() |
|
46 | |||
47 | /** |
||
48 | * @inheritdoc |
||
49 | */ |
||
50 | 1 | public function getNamedCell(string $name) |
|
54 | |||
55 | /** |
||
56 | * @inheritdoc |
||
57 | */ |
||
58 | 1 | public function addCell(CellInterface $item): CellCollectionInterface |
|
62 | |||
63 | /** |
||
64 | * @inheritdoc |
||
65 | */ |
||
66 | 2 | public function addNamedCell(string $name, CellInterface $cell): CellCollectionInterface |
|
70 | |||
71 | /** |
||
72 | * @throws \InvalidArgumentException |
||
73 | */ |
||
74 | 12 | private function validateNumberOfCells() |
|
88 | } |
||
89 |