Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function __construct(array $rows) |
||
16 | { |
||
17 | if (count($rows) === 0) { |
||
18 | throw new \InvalidArgumentException('At least one row needs to be given!'); |
||
19 | } |
||
20 | |||
21 | foreach ($rows as $row) { |
||
22 | if (!$row instanceof AbstractRow) { |
||
23 | throw new \InvalidArgumentException('Rows have to extend AbstractRow!'); |
||
24 | } |
||
25 | |||
26 | $this->rows[] = $row; |
||
27 | } |
||
28 | } |
||
29 | |||
44 |