| Conditions | 4 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 54 | public function build(array $buildSubject): array |
||
| 55 | { |
||
| 56 | if (!isset($buildSubject['payment']) |
||
| 57 | || !$buildSubject['payment'] instanceof PaymentDataObjectInterface |
||
| 58 | ) { |
||
| 59 | throw new InvalidArgumentException('Payment data object should be provided'); |
||
| 60 | } |
||
| 61 | $paymentDO = $buildSubject['payment']; |
||
| 62 | $order = $paymentDO->getOrder(); |
||
| 63 | $storeId = $order->getStoreId(); |
||
| 64 | |||
| 65 | return [ |
||
| 66 | self::STORE_ID => $storeId ?: 0, |
||
| 67 | ]; |
||
| 70 |