src/Viserio/Bridge/Twig/Command/DebugCommand.php
private function getLoaderPaths(Environment $twig): array
    {
        /** @var \Twig\Loader\FilesystemLoader $loader */
        $loader = $twig->getLoader();

        if (! $loader instanceof FilesystemLoader) {
            return [];
        }

        $loaderPaths = [];

        foreach ($loader->getNamespaces() as $namespace) {
            $paths = $loader->getPaths($namespace);

            if (FilesystemLoader::MAIN_NAMESPACE === $namespace) {
                $namespace = '(None)';
            } else {
                $namespace = '@' . $namespace;
            }

            $loaderPaths[$namespace] = $paths;
        }

        return $loaderPaths;
    }
private function getLoaderPaths(Environment $twig): array
    {
        /** @var \Twig\Loader\FilesystemLoader $loader */
        $loader = $twig->getLoader();

        if (! $loader instanceof FilesystemLoader) {
            return [];
        }

        $loaderPaths = [];

        foreach ($loader->getNamespaces() as $namespace) {
            $paths = $loader->getPaths($namespace);

            if (FilesystemLoader::MAIN_NAMESPACE === $namespace) {
                $namespace = '(None)';
            } else {
                $namespace = '@' . $namespace;
            }

            $loaderPaths[$namespace] = $paths;
        }

        return $loaderPaths;
    }
Get the loader paths.

@param \Twig\Environment $twig

@return array