| 1 | <?php |
||
| 14 | class VarDirectoryChecker implements EventSubscriberInterface |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Returns an array of event names this subscriber wants to listen to. |
||
| 18 | * |
||
| 19 | * @return array The event names to listen to |
||
| 20 | * |
||
| 21 | * @api |
||
| 22 | */ |
||
| 23 | public static function getSubscribedEvents() |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param ConsoleCommandEvent $event |
||
| 32 | * @return bool |
||
| 33 | */ |
||
| 34 | public function checkForVarDirectoryProblem(ConsoleCommandEvent $event): bool |
||
| 54 | } |
||
| 55 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: