| 1 | <?php |
||
| 7 | class Executor |
||
| 8 | { |
||
| 9 | protected $api; |
||
| 10 | protected $endpoint; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * Setup a api endpoint execution. |
||
| 14 | * |
||
| 15 | * @param Raidros\Storer\Api $api |
||
| 16 | */ |
||
| 17 | 12 | public function __construct(Api $api) |
|
| 21 | |||
| 22 | /** |
||
| 23 | * call a api endpoint. |
||
| 24 | * |
||
| 25 | * @param string $pointName |
||
| 26 | * @param array $data |
||
| 27 | * @param array $headers |
||
| 28 | * |
||
| 29 | * @return Raidros\Storer\Response |
||
| 30 | */ |
||
| 31 | 12 | public function run($pointName, array $data = [], array $headers = []) |
|
| 40 | |||
| 41 | /** |
||
| 42 | * make the request body. |
||
| 43 | * |
||
| 44 | * @param array $pointHeaders |
||
| 45 | * @param array $data |
||
| 46 | * |
||
| 47 | * @return array |
||
| 48 | */ |
||
| 49 | protected function makeBody($pointHeaders, $data) |
||
| 63 | } |
||
| 64 |
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.