Conditions | 5 |
Paths | 6 |
Total Lines | 13 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
22 | 110 | protected function indexRow($offset, $row) |
|
23 | { |
||
24 | 110 | $id = null; |
|
25 | 110 | $key = null; |
|
26 | 110 | if ($row instanceof Address) { |
|
27 | 102 | $id = $row->getId(); |
|
28 | 102 | $key = $row->getKey(); |
|
29 | 67 | } elseif (is_array($row)) { |
|
30 | 67 | $id = isset($row[static::ID]) ? $row[static::ID] : null; |
|
31 | 67 | $key = isset($row[static::KEY]) ? $row[static::KEY] : null; |
|
32 | } |
||
33 | 110 | $this->addToIndex(static::ID, $offset, $id); |
|
34 | 110 | $this->addToIndex(static::KEY, $offset, $key); |
|
35 | 110 | } |
|
46 |