| Conditions | 3 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 45 | public function build(array $buildSubject) |
||
| 46 | { |
||
| 47 | if (!isset($buildSubject['payment']) |
||
| 48 | || !$buildSubject['payment'] instanceof PaymentDataObjectInterface |
||
| 49 | ) { |
||
| 50 | throw new InvalidArgumentException('Payment data object should be provided'); |
||
| 51 | } |
||
| 52 | |||
| 53 | $paymentDO = $this->subjectReader->readPayment($buildSubject); |
||
| 54 | |||
| 55 | $result = []; |
||
| 56 | |||
| 57 | $order = $paymentDO->getOrder(); |
||
| 58 | |||
| 59 | $result[self::ORDER_ID] = $order->getOrderIncrementId(); |
||
| 60 | |||
| 61 | return $result; |
||
| 62 | } |
||
| 64 |