| Conditions | 5 |
| Paths | 5 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function handle(array $handlingSubject, array $response) |
||
| 32 | { |
||
| 33 | if (!isset($handlingSubject['payment']) |
||
| 34 | || !$handlingSubject['payment'] instanceof PaymentDataObjectInterface |
||
| 35 | ) { |
||
| 36 | throw new \InvalidArgumentException('Payment data object should be provided'); |
||
| 37 | } |
||
| 38 | |||
| 39 | $paymentDO = $handlingSubject['payment']; |
||
| 40 | $payment = $paymentDO->getPayment(); |
||
| 41 | |||
| 42 | $payment->setTransactionId($response['REFUND_ID']); |
||
| 43 | |||
| 44 | if ($response['STATUS'] === 'REQUESTED') { |
||
| 45 | $creditmemo = $payment->getCreditmemo(); |
||
| 46 | $creditmemo->setState(Creditmemo::STATE_OPEN); |
||
| 47 | } |
||
| 48 | |||
| 49 | if ($response['RESULT_CODE']) { |
||
| 50 | $paymentDO->getPayment(); |
||
| 51 | } |
||
| 54 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths