private function LintCommand::getFiles in Lockr 7.3
1 call to LintCommand::getFiles()
- LintCommand::execute in vendor/
symfony/ yaml/ Command/ LintCommand.php
File
- vendor/
symfony/ yaml/ Command/ LintCommand.php, line 182
Class
- LintCommand
- Validates YAML files syntax and outputs encountered errors.
Namespace
Symfony\Component\Yaml\CommandCode
private function getFiles($fileOrDirectory) {
if (is_file($fileOrDirectory)) {
(yield new \SplFileInfo($fileOrDirectory));
return;
}
foreach ($this
->getDirectoryIterator($fileOrDirectory) as $file) {
if (!\in_array($file
->getExtension(), [
'yml',
'yaml',
])) {
continue;
}
(yield $file);
}
}