protected function getFinder(array $paths): iterable
    {
        $foundFiles = [];
        $baseDir    = (array) $this->argument('dir');

        foreach ($baseDir as $dir) {
            if (\count($paths) !== 0) {
                foreach ($paths as $path) {
                    $this->findTwigFiles($dir . \DIRECTORY_SEPARATOR . $path, $foundFiles);
                }
            } else {
                $this->findTwigFiles($dir, $foundFiles);
            }
        }

        return $foundFiles;
    }