src/Viserio/Bridge/Twig/Command/LintCommand.php
private function findTwigFiles(string $dir, array &$foundFiles): void
    {
        try {
            $iterator = new RecursiveIteratorIterator(
                new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS),
                RecursiveIteratorIterator::SELF_FIRST
            );
        } catch (UnexpectedValueException $exception) {
            throw new RuntimeException($exception->getMessage());
        }

        foreach ($iterator as $file) {
            if (\pathinfo($file->getRealPath(), \PATHINFO_EXTENSION) === 'twig') {
                $foundFiles[] = $file;
            }
        }
    }
private function findTwigFiles(string $dir, array &$foundFiles): void
    {
        try {
            $iterator = new RecursiveIteratorIterator(
                new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS),
                RecursiveIteratorIterator::SELF_FIRST
            );
        } catch (UnexpectedValueException $exception) {
            throw new RuntimeException($exception->getMessage());
        }

        foreach ($iterator as $file) {
            if (\pathinfo($file->getRealPath(), \PATHINFO_EXTENSION) === 'twig') {
                $foundFiles[] = $file;
            }
        }
    }
Undocumented function.

@param string $dir
@param array  $foundFiles

@throws \RuntimeException

@return void