1 | <?php |
||
12 | final class CommonMarkTwig |
||
13 | { |
||
14 | private function __construct() |
||
17 | |||
18 | public static function createTwigLoader(): LoaderInterface |
||
22 | |||
23 | public static function configureTwig(Twig $twig): void |
||
36 | |||
37 | public static function setTwigRenderer(MarkdownConverter $converter, Twig $twig = null): void |
||
45 | |||
46 | } |
||
47 |
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.