Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
33 | public static function addExtension(\Twig_Environment $twig, $formTheme = 'form_div_layout.html.twig') |
||
34 | { |
||
35 | $formEngine = new TwigRendererEngine([$formTheme]); |
||
36 | $twig->addExtension( |
||
37 | new FormExtension(new TwigRenderer($formEngine)) |
||
38 | ); |
||
39 | |||
40 | $twig->addExtension( |
||
41 | new TranslationExtension( |
||
42 | Translator::instance() |
||
|
|||
43 | ) |
||
44 | ); |
||
45 | |||
46 | return $twig; |
||
47 | } |
||
48 | } |
||
49 |
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: