The expression return self::container->get($operationClass) could return the type null which is incompatible with the type-hinted return Sauls\Component\Helper\Operation\Operation. Consider adding an additional type-check to rule them out.
Loading history...
38
}
39
40
/**
41
*
42
* @throws \Exception
43
*/
44
1
private static function initialiseContainer(): void
45
{
46
1
self::$container = new ContainerBuilder();
47
48
1
$loader = new YamlFileLoader(self::$container, new FileLocator([__DIR__ . '/../../Resources/config']));