1 | <?php |
||
22 | class DefinitionSystem implements SystemInterface |
||
23 | { |
||
24 | /** |
||
25 | * @param RuleInterface $ast |
||
26 | * @return bool |
||
27 | */ |
||
28 | public function match(RuleInterface $ast): bool |
||
32 | |||
33 | /** |
||
34 | * @param Readable $file |
||
35 | * @param RuleInterface|ProvidesType|ProvidesName $ast |
||
36 | * @return \Generator|mixed |
||
37 | */ |
||
38 | public function apply(Readable $file, RuleInterface $ast) |
||
45 | } |
||
46 |
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: