src/Viserio/Provider/Twig/Provider/ConsoleCommandsServiceProvider.php
public static function extendConsole(ContainerInterface $container, ?Application $console = null): ?Application
    {
        if ($console !== null && $container->has(Environment::class)) {
            $console->add(new CleanCommand($container->get('config')));

            if (\class_exists(DebugCommand::class)) {
                $twig = $container->get(Environment::class);

                $console->addCommands([
                    new LintCommand($twig, $container->get(FinderContract::class), $container->get('config')),
                ]);
            }
        }

        return $console;
    }
public static function extendConsole(ContainerInterface $container, ?Application $console = null): ?Application
    {
        if ($console !== null && $container->has(Environment::class)) {
            $console->add(new CleanCommand($container->get('config')));

            if (\class_exists(DebugCommand::class)) {
                $twig = $container->get(Environment::class);

                $console->addCommands([
                    new LintCommand($twig, $container->get(FinderContract::class), $container->get('config')),
                ]);
            }
        }

        return $console;
    }
Extend viserio console with commands.

@param \Psr\Container\ContainerInterface           $container
@param null|\Viserio\Component\Console\Application $console

@return null|\Viserio\Component\Console\Application