Total Complexity | 4 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
15 | class CrefoPayApiClient implements CrefoPayApiClientInterface |
||
16 | { |
||
17 | /** |
||
18 | * @var \GuzzleHttp\ClientInterface |
||
19 | */ |
||
20 | protected $client; |
||
21 | |||
22 | /** |
||
23 | * @var \SprykerEco\Zed\CrefoPayApi\Business\Request\CrefoPayApiRequestInterface |
||
24 | */ |
||
25 | protected $request; |
||
26 | |||
27 | /** |
||
28 | * @var \SprykerEco\Zed\CrefoPayApi\Business\Converter\CrefoPayApiConverterInterface |
||
29 | */ |
||
30 | protected $converter; |
||
31 | |||
32 | public function performRequest(CrefoPayApiRequestTransfer $requestTransfer): CrefoPayApiResponseTransfer |
||
33 | { |
||
34 | $method = $this->getMethod(); |
||
35 | |||
36 | try { |
||
37 | /** @var \Psr\Http\Message\ResponseInterface $response */ |
||
38 | $response = $this->client->$method( |
||
39 | $this->request->getUrl(), |
||
40 | $this->request->getRequestOptions($requestTransfer) |
||
41 | ); |
||
42 | |||
43 | return $this->converter->convertToResponseTransfer($response); |
||
44 | |||
45 | } catch (RequestException $requestException) { |
||
46 | $response = $requestException->getResponse(); |
||
47 | return; |
||
48 | } catch (RequiredTransferPropertyException $requiredTransferPropertyException) { |
||
49 | return; |
||
50 | } |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * @return string |
||
55 | */ |
||
56 | protected function getMethod(): string |
||
59 | } |
||
60 | } |
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