public static function extendEngineResolver(
        ContainerInterface $container,
        ?EngineResolver $engines = null
    ): ?EngineResolver {
        if ($engines !== null) {
            // @var EngineResolver $engines
            $engines->register('twig', static function () use ($container) {
                return $container->get(TwigEngine::class);
            });
        }

        return $engines;
    }
public static function extendEngineResolver(
        ContainerInterface $container,
        ?EngineResolver $engines = null
    ): ?EngineResolver {
        if ($engines !== null) {
            // @var EngineResolver $engines
            $engines->register('twig', static function () use ($container) {
                return $container->get(TwigEngine::class);
            });
        }

        return $engines;
    }
public static function extendEngineResolver ( ContainerInterface $ container , ? EngineResolver $ engines = null ) : ? EngineResolver { if ( $ engines !== null ) { // @var EngineResolver $engines $ engines -> register ( 'twig' , static function ( ) use ( $ container ) { return $ container -> get ( TwigEngine :: class ) ; } ) ; } return $ engines ; }
Extend EngineResolver with twig extension.

@param \Psr\Container\ContainerInterface                  $container
@param null|\Viserio\Component\View\Engine\EngineResolver $engines

@return null|\Viserio\Component\View\Engine\EngineResolver
Extend EngineResolver with twig extension .