$app of type object<Pimple\Container> is not a sub-type of object<Silex\Application>. It seems like you assume a child class of the class Pimple\Container to be always present.
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.
Loading history...
28
return $types;
29
});
30
}
31
32
2
if ($app->offsetExists('twig')) {
33
$app['twig'] = $app->extend('twig', function(\Twig_Environment $twig) use ($app) {
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.