Conditions | 1 |
Paths | 1 |
Total Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | protected function prepareRequest() |
||
26 | { |
||
27 | $this->client = new Client([ |
||
28 | 'base_uri' => PayWithBank3D::$baseUrl[PayWithBank3D::$mode], |
||
29 | 'auth' => [PayWithBank3D::$publicKey, PayWithBank3D::$secretKey], |
||
30 | 'headers' => ['Content-Type' => 'application/json', 'Accept' => 'application/json'], |
||
31 | ]); |
||
32 | } |
||
33 | |||
63 |
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.