1 | <?php |
||
10 | class TwigTemplate implements TemplateInterface |
||
11 | { |
||
12 | private $template; |
||
13 | |||
14 | 14 | public function __construct(\Twig_Template $template) |
|
18 | |||
19 | /** |
||
20 | * {@inheritdoc} |
||
21 | */ |
||
22 | 14 | public function getTemplateName() |
|
26 | |||
27 | /** |
||
28 | * {@inheritdoc} |
||
29 | */ |
||
30 | public function getParentTemplate() |
||
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | 14 | public function render(array $context = []) |
|
48 | } |
||
49 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.