Conditions | 5 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | public function build(array $buildSubject): array |
||
30 | { |
||
31 | if (!isset($buildSubject['payment']) |
||
32 | || !$buildSubject['payment'] instanceof PaymentDataObjectInterface |
||
33 | ) { |
||
34 | throw new \InvalidArgumentException('Payment data object should be provided'); |
||
35 | } |
||
36 | $result = []; |
||
37 | $paymentDO = $buildSubject['payment']; |
||
38 | $payment = $paymentDO->getPayment(); |
||
39 | if ($payment->getMethod() === 'moip_magento2_cc') { |
||
40 | if (!empty($data[$payment->getAdditionalInformation(VaultConfigProvider::IS_ACTIVE_CODE)])) { |
||
41 | $result[self::OPTIONS] = [ |
||
42 | self::STORE_IN_VAULT_ON_SUCCESS => true, |
||
43 | ]; |
||
44 | } |
||
45 | } |
||
46 | |||
47 | return $result; |
||
48 | } |
||
50 |
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