| Conditions | 6 |
| Paths | 20 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 6.288 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 5 | protected function indexRow($offset, $row) |
|
| 25 | { |
||
| 26 | 5 | if ($row instanceof ShippingMethod) { |
|
| 27 | $name = $row->getName(); |
||
| 28 | $id = $row->getId(); |
||
| 29 | } else { |
||
| 30 | 5 | $name = isset($row[static::NAME]) ? $row[static::NAME] : null; |
|
| 31 | 5 | $id = isset($row[static::ID]) ? $row[static::ID] : null; |
|
| 32 | } |
||
| 33 | 5 | if (!empty($name)) { |
|
| 34 | 2 | $this->addToIndex(static::NAME, $offset, $name); |
|
| 35 | } |
||
| 36 | 5 | if (!empty($id)) { |
|
| 37 | 2 | $this->addToIndex(static::ID, $offset, $id); |
|
| 38 | } |
||
| 50 |