1 | <?php |
||
20 | class TypeHintNode extends Rule |
||
21 | { |
||
22 | /** |
||
23 | * @var TypeHint |
||
24 | */ |
||
25 | private $hint; |
||
26 | |||
27 | /** |
||
28 | * TypeHintNode constructor. |
||
29 | * @param string $name |
||
30 | * @param array $children |
||
31 | * @param int $offset |
||
32 | */ |
||
33 | public function __construct(string $name, array $children = [], int $offset = 0) |
||
55 | |||
56 | /** |
||
57 | * @param RuleInterface|NodeInterface $rule |
||
58 | * @return \Generator |
||
59 | */ |
||
60 | private function analyze(RuleInterface $rule): \Generator |
||
69 | |||
70 | /** |
||
71 | * @return int |
||
72 | */ |
||
73 | public function getModifiers(): int |
||
77 | } |
||
78 |
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: