| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | 8 | public function push(ItemCodeInterface $itemcode) |
|
| 9 | { |
||
| 10 | 8 | $code = $itemcode->getCode(); |
|
| 11 | |||
| 12 | 8 | if (!$this->has($code)): |
|
| 13 | 8 | $inserter = new InsertOrUpdateItemCode($this->pdo, $this->table_name, $this->logger); |
|
| 14 | 8 | $result = $inserter->execute($itemcode); |
|
| 15 | 8 | $this->logger->notice("Inserted missing Item code '{code}'", [ |
|
| 16 | 8 | 'code' => $code, |
|
| 17 | 8 | 'result' => $result |
|
| 18 | ]); |
||
| 19 | endif; |
||
| 20 | |||
| 21 | 8 | return parent::push($itemcode); |
|
| 22 | } |
||
| 23 | |||
| 46 |