1 | <?php |
||
13 | class Worker extends AbstractWorker |
||
14 | { |
||
15 | |||
16 | // region VALIDATE ******************************************************** |
||
17 | |||
18 | /** |
||
19 | * @param Job $job |
||
20 | * |
||
21 | * @throws ResultException |
||
22 | */ |
||
23 | 2 | protected function validateJobParams(Job $job) |
|
42 | |||
43 | // endregion ************************************************************* |
||
44 | |||
45 | /** |
||
46 | * @param $token |
||
47 | * |
||
48 | * @return \HipChat\HipChat |
||
49 | */ |
||
50 | 1 | public function getTransport($token) |
|
54 | |||
55 | /** |
||
56 | * @param Job $job |
||
57 | * |
||
58 | * @return bool |
||
59 | */ |
||
60 | 1 | protected function sendMessage(Job $job) |
|
77 | |||
78 | /** |
||
79 | * @param AbstractJob|Job $job |
||
80 | * |
||
81 | * @throws ResultException |
||
82 | */ |
||
83 | 2 | protected function doJob(AbstractJob $job) |
|
95 | } |
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.