Total Complexity | 6 |
Total Lines | 57 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
14 | class CaptureRequestConverter implements CrefoPayApiRequestConverterInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var \SprykerEco\Zed\CrefoPayApi\CrefoPayApiConfig |
||
18 | */ |
||
19 | protected $config; |
||
20 | |||
21 | /** |
||
22 | * @param \SprykerEco\Zed\CrefoPayApi\CrefoPayApiConfig $config |
||
23 | */ |
||
24 | public function __construct(CrefoPayApiConfig $config) |
||
25 | { |
||
26 | $this->config = $config; |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @param \Generated\Shared\Transfer\CrefoPayApiRequestTransfer $requestTransfer |
||
31 | * |
||
32 | * @return array |
||
33 | */ |
||
34 | public function convertRequestTransferToArray(CrefoPayApiRequestTransfer $requestTransfer): array |
||
35 | { |
||
36 | $captureRequest = $requestTransfer->getCaptureRequest(); |
||
37 | if ($captureRequest === null) { |
||
38 | return []; |
||
39 | } |
||
40 | |||
41 | return [ |
||
42 | $this->config->getApiFieldMerchantId() => $captureRequest->getMerchantID(), |
||
43 | $this->config->getApiFieldStoreId() => $captureRequest->getStoreID(), |
||
44 | $this->config->getApiFieldOrderId() => $captureRequest->getOrderID(), |
||
45 | $this->config->getApiFieldCaptureId() => $captureRequest->getCaptureID(), |
||
46 | $this->config->getApiFieldAmount() => $this->getAmountData($captureRequest->getAmount()), |
||
47 | ]; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @param \Generated\Shared\Transfer\CrefoPayApiAmountTransfer|null $amountTransfer |
||
52 | * |
||
53 | * @return array|null |
||
54 | */ |
||
55 | protected function getAmountData(?CrefoPayApiAmountTransfer $amountTransfer): ?array |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * @param \Generated\Shared\Transfer\CrefoPayApiAmountTransfer $amountTransfer |
||
62 | * |
||
63 | * @return array |
||
64 | */ |
||
65 | protected function convertAmountTransferToArray(CrefoPayApiAmountTransfer $amountTransfer): array |
||
74 |
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