1 | <?php |
||
24 | class RuleDelegate extends Rule |
||
25 | { |
||
26 | /** |
||
27 | * @return iterable|TokenInterface[]|LookaheadIterator |
||
28 | */ |
||
29 | public function getInnerTokens(): iterable |
||
36 | |||
37 | /** |
||
38 | * @param RuleInterface|NodeInterface $rule |
||
39 | * @return \Traversable |
||
40 | */ |
||
41 | private function getTokens(RuleInterface $rule): \Traversable |
||
52 | |||
53 | /** |
||
54 | * @return string |
||
55 | * @throws \Railt\Parser\Exception\InternalException |
||
56 | * @throws \Railt\Parser\Exception\ParserException |
||
57 | */ |
||
58 | public function getRuleName(): string |
||
62 | |||
63 | /** |
||
64 | * @return bool |
||
65 | * @throws \Railt\Parser\Exception\InternalException |
||
66 | * @throws \Railt\Parser\Exception\ParserException |
||
67 | */ |
||
68 | public function isKept(): bool |
||
72 | |||
73 | /** |
||
74 | * @return null|string |
||
75 | * @throws \Railt\Parser\Exception\InternalException |
||
76 | * @throws \Railt\Parser\Exception\ParserException |
||
77 | */ |
||
78 | public function getDelegate(): ?string |
||
82 | } |
||
83 |
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: