1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* MIT License |
5
|
|
|
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. |
6
|
|
|
*/ |
7
|
|
|
|
8
|
|
|
namespace SprykerEco\Client\Payone\ClientApi\Call; |
9
|
|
|
|
10
|
|
|
use Generated\Shared\Transfer\PayoneStandardParameterTransfer; |
|
|
|
|
11
|
|
|
use Spryker\Service\UtilEncoding\UtilEncodingServiceInterface; |
12
|
|
|
use SprykerEco\Client\Payone\ClientApi\HashGeneratorInterface; |
13
|
|
|
use SprykerEco\Client\Payone\ClientApi\Request\AbstractRequest; |
14
|
|
|
use SprykerEco\Shared\Payone\Dependency\ModeDetectorInterface; |
15
|
|
|
|
16
|
|
|
abstract class AbstractCall implements CallInterface |
17
|
|
|
{ |
18
|
|
|
/** |
19
|
|
|
* @var \Generated\Shared\Transfer\PayoneStandardParameterTransfer |
20
|
|
|
*/ |
21
|
|
|
protected $standardParameter; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @var \SprykerEco\Client\Payone\ClientApi\HashGeneratorInterface |
25
|
|
|
*/ |
26
|
|
|
protected $hashGenerator; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @var \SprykerEco\Shared\Payone\Dependency\ModeDetectorInterface |
30
|
|
|
*/ |
31
|
|
|
protected $modeDetector; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @var \Spryker\Service\UtilEncoding\UtilEncodingServiceInterface |
35
|
|
|
*/ |
36
|
|
|
protected $utilEncodingService; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @param \Generated\Shared\Transfer\PayoneStandardParameterTransfer $standardParameterTransfer |
40
|
|
|
* @param \SprykerEco\Client\Payone\ClientApi\HashGeneratorInterface $hashGenerator |
41
|
|
|
* @param \SprykerEco\Shared\Payone\Dependency\ModeDetectorInterface $modeDetector |
42
|
|
|
* @param \Spryker\Service\UtilEncoding\UtilEncodingServiceInterface $utilEncodingService |
43
|
|
|
*/ |
44
|
|
|
public function __construct( |
45
|
|
|
PayoneStandardParameterTransfer $standardParameterTransfer, |
46
|
|
|
HashGeneratorInterface $hashGenerator, |
47
|
|
|
ModeDetectorInterface $modeDetector, |
48
|
|
|
UtilEncodingServiceInterface $utilEncodingService |
49
|
|
|
) { |
50
|
|
|
$this->standardParameter = $standardParameterTransfer; |
51
|
|
|
$this->hashGenerator = $hashGenerator; |
52
|
|
|
$this->modeDetector = $modeDetector; |
53
|
|
|
$this->utilEncodingService = $utilEncodingService; |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @param \SprykerEco\Client\Payone\ClientApi\Request\AbstractRequest $container |
58
|
|
|
* |
59
|
|
|
* @return void |
60
|
|
|
*/ |
61
|
|
|
protected function applyStandardParameter(AbstractRequest $container): void |
62
|
|
|
{ |
63
|
|
|
if ($container->getPortalid() === null) { |
64
|
|
|
$container->setPortalid($this->standardParameter->getPortalId()); |
65
|
|
|
} |
66
|
|
|
if ($container->getAid() === null) { |
67
|
|
|
$container->setAid($this->standardParameter->getAid()); |
68
|
|
|
} |
69
|
|
|
if ($container->getMid() === null) { |
70
|
|
|
$container->setMid($this->standardParameter->getMid()); |
71
|
|
|
} |
72
|
|
|
if ($container->getEncoding() === null) { |
73
|
|
|
$container->setEncoding($this->standardParameter->getEncoding()); |
74
|
|
|
} |
75
|
|
|
if ($container->getMode() === null) { |
76
|
|
|
$container->setMode($this->modeDetector->getMode()); |
77
|
|
|
} |
78
|
|
|
if ($container->getLanguage() === null) { |
79
|
|
|
$container->setLanguage($this->standardParameter->getLanguage()); |
80
|
|
|
} |
81
|
|
|
if ($container->getResponseType() === null) { |
82
|
|
|
$container->setResponseType($this->standardParameter->getResponseType()); |
83
|
|
|
} |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* @return \Generated\Shared\Transfer\PayoneStandardParameterTransfer |
88
|
|
|
*/ |
89
|
|
|
protected function getStandardParameter(): PayoneStandardParameterTransfer |
90
|
|
|
{ |
91
|
|
|
return $this->standardParameter; |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @return \SprykerEco\Client\Payone\ClientApi\HashGeneratorInterface |
96
|
|
|
*/ |
97
|
|
|
protected function getHashGenerator(): HashGeneratorInterface |
98
|
|
|
{ |
99
|
|
|
return $this->hashGenerator; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @return \SprykerEco\Shared\Payone\Dependency\ModeDetectorInterface |
104
|
|
|
*/ |
105
|
|
|
protected function getModeDetector(): ModeDetectorInterface |
106
|
|
|
{ |
107
|
|
|
return $this->modeDetector; |
108
|
|
|
} |
109
|
|
|
} |
110
|
|
|
|
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