Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | public function resolve(MollieGatewayConfigInterface $method, OrderItemInterface $item, array $details): ?string |
||
22 | { |
||
23 | if ($method->getMethodId() === MealVoucher::MEAL_VOUCHERS) { |
||
|
|||
24 | if (null === $method->getDefaultCategory()) { |
||
25 | return $this->getMealVoucherFromItem($item); |
||
26 | } else { |
||
27 | return $method->getDefaultCategory()->getName(); |
||
28 | } |
||
29 | } |
||
30 | |||
31 | return null; |
||
32 | } |
||
45 |