src/Viserio/Bridge/Twig/Extractor/TwigExtractor.php
protected function extractFromDirectory($directory): array
    {
        $iterator = new RecursiveIteratorIterator(
            new RecursiveDirectoryIterator($directory, RecursiveDirectoryIterator::SKIP_DOTS)
        );
        $files    = [];

        foreach ($iterator as $file) {
            if ($this->isTwigFile($file->getPathname())) {
                $files[] = $file->getPathname();
            }
        }

        return $files;
    }
protected function extractFromDirectory($directory): array
    {
        $iterator = new RecursiveIteratorIterator(
            new RecursiveDirectoryIterator($directory, RecursiveDirectoryIterator::SKIP_DOTS)
        );
        $files    = [];

        foreach ($iterator as $file) {
            if ($this->isTwigFile($file->getPathname())) {
                $files[] = $file->getPathname();
            }
        }

        return $files;
    }
@param array|string $directory

@return array