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 | 15 | 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 | 15 | public function run($pointName, array $data = [], array $headers = []) |
|
43 | |||
44 | /** |
||
45 | * make the request body. |
||
46 | * |
||
47 | * @param array $pointHeaders |
||
48 | * @param array $data |
||
49 | * |
||
50 | * @return array |
||
51 | */ |
||
52 | 15 | protected function makeBody($pointHeaders, $data) |
|
67 | } |
||
68 |
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.