| Total Complexity | 12 |
| Total Lines | 183 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | class HeidelpayClient extends AbstractClient implements HeidelpayClientInterface |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * {@inheritdoc} |
||
| 23 | * |
||
| 24 | * @api |
||
| 25 | * |
||
| 26 | * @param string $errorCode |
||
| 27 | * |
||
| 28 | * @return string |
||
| 29 | */ |
||
| 30 | public function translateErrorMessageByCode($errorCode) |
||
| 31 | { |
||
| 32 | $currentLocale = $this->getCurrentLocale(); |
||
| 33 | |||
| 34 | return $this->getFactory() |
||
| 35 | ->createHeidelpayApiAdapter() |
||
| 36 | ->getTranslatedMessageByCode($errorCode, $currentLocale); |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * {@inheritdoc} |
||
| 41 | * |
||
| 42 | * @api |
||
| 43 | * |
||
| 44 | * @param string $orderReference |
||
| 45 | * |
||
| 46 | * @return \Generated\Shared\Transfer\HeidelpayTransactionLogTransfer |
||
|
1 ignored issue
–
show
|
|||
| 47 | */ |
||
| 48 | public function getAuthorizeTransactionLogForOrder($orderReference) |
||
| 49 | { |
||
| 50 | return $this->getFactory() |
||
| 51 | ->createZedStub() |
||
| 52 | ->getAuthorizeTransactionLogByOrderReference($orderReference); |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * {@inheritdoc} |
||
| 57 | * |
||
| 58 | * @api |
||
| 59 | * |
||
| 60 | * @return \Generated\Shared\Transfer\QuoteTransfer |
||
| 61 | */ |
||
| 62 | public function getQuoteFromSession() |
||
| 63 | { |
||
| 64 | return $this->getFactory() |
||
| 65 | ->getQuoteClient() |
||
| 66 | ->getQuote(); |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * {@inheritdoc} |
||
| 71 | * |
||
| 72 | * @api |
||
| 73 | * |
||
| 74 | * @param array $externalResponse |
||
| 75 | * |
||
| 76 | * @return \Generated\Shared\Transfer\HeidelpayRegistrationRequestTransfer |
||
| 77 | */ |
||
| 78 | public function parseExternalResponse(array $externalResponse) |
||
| 79 | { |
||
| 80 | return $this->getFactory() |
||
| 81 | ->createExternalResponseValidator() |
||
| 82 | ->parseExternalResponse($externalResponse); |
||
| 83 | } |
||
| 84 | |||
| 85 | /** |
||
| 86 | * {@inheritdoc} |
||
| 87 | * |
||
| 88 | * @api |
||
| 89 | * |
||
| 90 | * @param array $externalResponse |
||
| 91 | * |
||
| 92 | * @return \Generated\Shared\Transfer\HeidelpayPaymentProcessingResponseTransfer |
||
|
1 ignored issue
–
show
|
|||
| 93 | */ |
||
| 94 | public function processExternalPaymentResponse(array $externalResponse) |
||
| 101 | } |
||
| 102 | |||
| 103 | /** |
||
| 104 | * {@inheritdoc} |
||
| 105 | * |
||
| 106 | * @api |
||
| 107 | * |
||
| 108 | * @param \Generated\Shared\Transfer\HeidelpayRegistrationRequestTransfer $registrationRequestTransfer |
||
| 109 | * |
||
| 110 | * @return \Generated\Shared\Transfer\HeidelpayRegistrationSaveResponseTransfer |
||
|
1 ignored issue
–
show
|
|||
| 111 | */ |
||
| 112 | public function saveCreditCardRegistration(HeidelpayRegistrationRequestTransfer $registrationRequestTransfer) |
||
| 113 | { |
||
| 114 | return $this->getFactory() |
||
| 115 | ->createZedStub() |
||
| 116 | ->saveCreditCardRegistration($registrationRequestTransfer); |
||
| 117 | } |
||
| 118 | |||
| 119 | /** |
||
| 120 | * {@inheritdoc} |
||
| 121 | * |
||
| 122 | * @api |
||
| 123 | * |
||
| 124 | * @param int $idRegistration |
||
| 125 | * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer |
||
| 126 | * |
||
| 127 | * @return \Generated\Shared\Transfer\HeidelpayCreditCardRegistrationTransfer|null |
||
|
1 ignored issue
–
show
|
|||
| 128 | */ |
||
| 129 | public function findRegistrationByIdAndQuote($idRegistration, QuoteTransfer $quoteTransfer) |
||
| 136 | } |
||
| 137 | |||
| 138 | /** |
||
| 139 | * {@inheritdoc} |
||
| 140 | * |
||
| 141 | * @api |
||
| 142 | * |
||
| 143 | * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer |
||
| 144 | * |
||
| 145 | * @return \Generated\Shared\Transfer\HeidelpayCreditCardPaymentOptionsTransfer |
||
|
1 ignored issue
–
show
|
|||
| 146 | */ |
||
| 147 | public function getCreditCardPaymentOptions(QuoteTransfer $quoteTransfer) |
||
| 152 | } |
||
| 153 | |||
| 154 | /** |
||
| 155 | * {@inheritdoc} |
||
| 156 | * |
||
| 157 | * @api |
||
| 158 | * |
||
| 159 | * @param array $responseArray |
||
| 160 | * |
||
| 161 | * @return array |
||
| 162 | */ |
||
| 163 | public function filterResponseParameters(array $responseArray) |
||
| 164 | { |
||
| 165 | return array_filter($responseArray, function ($key) { |
||
| 166 | return !preg_match('/^paymentForm+|^lang+/', $key); |
||
| 167 | }, ARRAY_FILTER_USE_KEY); |
||
| 168 | } |
||
| 169 | |||
| 170 | /** |
||
| 171 | * @return string |
||
| 172 | */ |
||
| 173 | protected function getCurrentLocale() |
||
| 178 | } |
||
| 179 | |||
| 180 | /** |
||
| 181 | * @param array $externalResponse |
||
| 182 | * |
||
| 183 | * @return \Generated\Shared\Transfer\HeidelpayExternalPaymentRequestTransfer |
||
| 184 | */ |
||
| 185 | protected function buildTransferFromExternalResponseArray(array $externalResponse) |
||
| 186 | { |
||
| 187 | return (new HeidelpayExternalPaymentRequestTransfer()) |
||
| 188 | ->setBody($externalResponse); |
||
| 189 | } |
||
| 190 | |||
| 191 | /** |
||
| 192 | * @param int $idRegistration |
||
| 193 | * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer |
||
| 194 | * |
||
| 195 | * @return \Generated\Shared\Transfer\HeidelpayRegistrationByIdAndQuoteRequestTransfer |
||
| 196 | */ |
||
| 197 | protected function buildFindRegistrationRequestTransfer($idRegistration, QuoteTransfer $quoteTransfer) |
||
| 202 | } |
||
| 203 | } |
||
| 204 |
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