Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LintCommand.php

function LintCommand::getFiles

1 call to LintCommand::getFiles()
LintCommand::execute in vendor/symfony/yaml/Command/LintCommand.php
Executes the current command.

File

vendor/symfony/yaml/Command/LintCommand.php, line 218

Class

LintCommand
Validates YAML files syntax and outputs encountered errors.

Namespace

Symfony\Component\Yaml\Command

Code

private function getFiles(string $fileOrDirectory) : iterable {
    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);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal