1 | <?php |
||
9 | abstract class ApiRequest |
||
10 | { |
||
11 | protected $baseUrl; |
||
12 | /** |
||
13 | * @var mixed |
||
14 | */ |
||
15 | private $secretKey; |
||
16 | |||
17 | private $publicKey; |
||
18 | |||
19 | protected $client; |
||
20 | private $response; |
||
21 | |||
22 | public function __construct() |
||
29 | |||
30 | public function setBaseUrl() |
||
31 | { |
||
32 | $this->baseUrl = Config::get('paywithbank3d.mode') === 'test' ? Config::get('paywithbank3d.testUrl') : Config::get('paywithbank3d.liveURL'); |
||
33 | } |
||
34 | |||
35 | public function setConstant() |
||
40 | |||
41 | protected function checkConstant() |
||
55 | |||
56 | protected function prepareRequest() |
||
64 | |||
65 | public function getResponse() |
||
72 | |||
73 | protected function performGetRequest($relativeUrl) |
||
79 | |||
80 | protected function performPostRequest($relativeUrl, $data) |
||
86 | } |
||
87 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.