1 | <?php |
||
16 | abstract class AbstractGateway extends \Omnipay\Common\AbstractGateway |
||
17 | { |
||
18 | protected $liveEndpoint = 'http://www.payline.com/wsdl/v4_0/production'; |
||
19 | protected $testEndpoint = 'http://www.payline.com/wsdl/v4_0/homologation'; |
||
20 | |||
21 | abstract public function getEndPoint(); |
||
22 | |||
23 | /** |
||
24 | * AbstractGateway constructor. |
||
25 | * |
||
26 | * @param \SoapClient|null $httpClient |
||
27 | * @param HttpRequest|null $httpRequest |
||
28 | */ |
||
29 | 90 | public function __construct(\SoapClient $httpClient = null, HttpRequest $httpRequest = null) |
|
35 | |||
36 | 33 | protected function createRequest($class, array $parameters) |
|
45 | |||
46 | 90 | public function getDefaultParameters() |
|
59 | |||
60 | /** |
||
61 | * @return string |
||
62 | */ |
||
63 | 6 | public function getMerchantId() |
|
67 | |||
68 | /** |
||
69 | * @param string $merchantId |
||
70 | * |
||
71 | * @return $this |
||
72 | */ |
||
73 | 90 | public function setMerchantId($merchantId) |
|
77 | |||
78 | /** |
||
79 | * @return string |
||
80 | */ |
||
81 | 6 | public function getAccessKey() |
|
85 | |||
86 | /** |
||
87 | * @param string $accessKey |
||
88 | * |
||
89 | * @return $this |
||
90 | */ |
||
91 | 90 | public function setAccessKey($accessKey) |
|
95 | |||
96 | /** |
||
97 | * @return string |
||
98 | */ |
||
99 | 3 | public function getContractNumber() |
|
103 | |||
104 | /** |
||
105 | * @param string $contractNumber |
||
106 | * |
||
107 | * @return $this |
||
108 | */ |
||
109 | 90 | public function setContractNumber($contractNumber) |
|
113 | |||
114 | /** |
||
115 | * @return string |
||
116 | */ |
||
117 | 6 | public function getProxyHost() |
|
121 | |||
122 | /** |
||
123 | * @param string $proxyHost |
||
124 | * |
||
125 | * @return $this |
||
126 | */ |
||
127 | 15 | public function setProxyHost($proxyHost) |
|
131 | |||
132 | /** |
||
133 | * @return string |
||
134 | */ |
||
135 | 3 | public function getProxyPort() |
|
139 | |||
140 | /** |
||
141 | * @param string $proxyPort |
||
142 | * |
||
143 | * @return $this |
||
144 | */ |
||
145 | 15 | public function setProxyPort($proxyPort) |
|
149 | |||
150 | /** |
||
151 | * @return string |
||
152 | */ |
||
153 | 3 | public function getProxyLogin() |
|
157 | |||
158 | /** |
||
159 | * @param string $proxyLogin |
||
160 | * |
||
161 | * @return $this |
||
162 | */ |
||
163 | 15 | public function setProxyLogin($proxyLogin) |
|
167 | |||
168 | /** |
||
169 | * @return string |
||
170 | */ |
||
171 | 3 | public function getProxyPassword() |
|
175 | |||
176 | /** |
||
177 | * @param string $proxyPassword |
||
178 | * |
||
179 | * @return $this |
||
180 | */ |
||
181 | 15 | public function setProxyPassword($proxyPassword) |
|
185 | |||
186 | /** |
||
187 | * @return \SoapClient |
||
188 | */ |
||
189 | 3 | public function getDefaultHttpClient() |
|
209 | } |
||
210 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.
For example, imagine you have a variable
$accountId
that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to theid
property of an instance of theAccount
class. This class holds a proper account, so the id value must no longer be false.Either this assignment is in error or a type check should be added for that assignment.