| Conditions | 3 |
| Paths | 3 |
| Total Lines | 25 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function aroundSaveTokenWithPaymentLink( |
||
| 23 | PaymentTokenManagementInterface $paymentTokenManagement, |
||
| 24 | callable $proceed, |
||
| 25 | PaymentTokenInterface $token, |
||
| 26 | OrderPaymentInterface $payment |
||
| 27 | ): bool { |
||
| 28 | $order = $payment->getOrder(); |
||
| 29 | |||
| 30 | if ($order->getCustomerIsGuest()) { |
||
| 31 | return $proceed($token, $payment); |
||
| 32 | } |
||
| 33 | |||
| 34 | $existingToken = $paymentTokenManagement->getByGatewayToken( |
||
| 35 | $token->getGatewayToken(), |
||
| 36 | $payment->getMethodInstance()->getCode(), |
||
| 37 | $order->getCustomerId() |
||
| 38 | ); |
||
| 39 | |||
| 40 | if ($existingToken === null) { |
||
| 41 | return $proceed($token, $payment); |
||
| 42 | } |
||
| 43 | |||
| 44 | $existingToken->addData($token->getData()); |
||
| 45 | |||
| 46 | return $proceed($existingToken, $payment); |
||
| 47 | } |
||
| 49 |
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