| Conditions | 3 |
| Paths | 5 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 224 | final public function execute(ItemInterface $item, PurchaseContext $context) |
|
| 33 | { |
||
| 34 | try { |
||
| 35 | 224 | $this->validate($item, $context); |
|
| 36 | |||
| 37 | 217 | return ProcessResult::success(); |
|
| 38 | 68 | } catch (InvalidItemException $e) { |
|
| 39 | 68 | if ($item instanceof CartItem) { |
|
| 40 | 39 | $this->handle($item, $context); |
|
| 41 | } |
||
| 42 | |||
| 43 | 68 | return ProcessResult::warn($e->getMessage()); |
|
| 44 | } |
||
| 45 | } |
||
| 46 | |||
| 65 |