1 | <?php |
||
20 | class Renderer |
||
21 | { |
||
22 | /** |
||
23 | * @param mixed $value |
||
24 | * @return string |
||
25 | */ |
||
26 | public static function render($value): string |
||
53 | |||
54 | /** |
||
55 | * @param NodeInterface $ast |
||
56 | * @return string |
||
57 | */ |
||
58 | private static function node(NodeInterface $ast): string |
||
62 | |||
63 | /** |
||
64 | * @param OpcodeInterface $opcode |
||
65 | * @return string |
||
66 | */ |
||
67 | private static function opcode(OpcodeInterface $opcode): string |
||
71 | |||
72 | /** |
||
73 | * @param ValueInterface $value |
||
74 | * @return string |
||
75 | */ |
||
76 | private static function value(ValueInterface $value): string |
||
80 | |||
81 | /** |
||
82 | * @param mixed $value |
||
83 | * @return string |
||
84 | */ |
||
85 | private static function scalar($value): string |
||
102 | |||
103 | /** |
||
104 | * @param iterable $values |
||
105 | * @return string |
||
106 | */ |
||
107 | private static function iterable(iterable $values): string |
||
119 | |||
120 | /** |
||
121 | * @param mixed $value |
||
122 | * @return string |
||
123 | */ |
||
124 | private static function object($value): string |
||
128 | |||
129 | /** |
||
130 | * @param Readable $readable |
||
131 | * @return string |
||
132 | */ |
||
133 | private static function file(Readable $readable): string |
||
137 | } |
||
138 |
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: