Conditions | 4 |
Paths | 4 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
22 | 18 | protected function indexRow($offset, $row) |
|
23 | { |
||
24 | 18 | $id = null; |
|
25 | 18 | if ($row instanceof DeliveryItem) { |
|
26 | 18 | $id = $row->getId(); |
|
27 | 12 | } elseif (is_array($row)) { |
|
28 | 12 | $id = isset($row[static::ID]) ? $row[static::ID] : null; |
|
29 | } |
||
30 | 18 | $this->addToIndex(static::ID, $offset, $id); |
|
31 | 18 | } |
|
33 |