| 1 | <?php |
||
| 8 | abstract class PRequest |
||
| 9 | { |
||
| 10 | protected $client; |
||
| 11 | |||
| 12 | protected $response; |
||
| 13 | |||
| 14 | protected $data; |
||
| 15 | |||
| 16 | public function __construct() |
||
| 24 | |||
| 25 | protected function prepareRequest() |
||
| 33 | |||
| 34 | public function getResponse() |
||
| 41 | |||
| 42 | protected function performGetRequest($relativeUrl) |
||
| 48 | |||
| 49 | protected function performPostRequest($relativeUrl) |
||
| 55 | |||
| 56 | public function addBody($name, $value) |
||
| 62 | } |
||
| 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.