1 | <?php |
||
23 | class Runtime |
||
24 | { |
||
25 | /** |
||
26 | * @var RuleResolver |
||
27 | */ |
||
28 | private $rules; |
||
29 | |||
30 | /** |
||
31 | * @var PragmaResolver |
||
32 | */ |
||
33 | private $config; |
||
34 | |||
35 | /** |
||
36 | * @var TokenResolver |
||
37 | */ |
||
38 | private $tokens; |
||
39 | |||
40 | /** |
||
41 | * Runtime constructor. |
||
42 | * @param Result $result |
||
43 | */ |
||
44 | public function __construct(Result $result) |
||
50 | /** |
||
51 | * @return LexerInterface |
||
52 | */ |
||
53 | public function getLexer(): LexerInterface |
||
63 | |||
64 | /** |
||
65 | * @return ParserInterface |
||
66 | * @throws \InvalidArgumentException |
||
67 | */ |
||
68 | public function getParser(): ParserInterface |
||
80 | } |
||
81 |
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: