You are here

private function LintCommand::getFilesInfo in Twig Tweak 3.1.x

Same name and namespace in other branches
  1. 3.x src/Command/LintCommand.php \Drupal\twig_tweak\Command\LintCommand::getFilesInfo()
1 call to LintCommand::getFilesInfo()
LintCommand::execute in src/Command/LintCommand.php

File

src/Command/LintCommand.php, line 131

Class

LintCommand
Command that will validate your template syntax and output encountered errors.

Namespace

Drupal\twig_tweak\Command

Code

private function getFilesInfo(array $filenames) : array {
  $filesInfo = [];
  foreach ($filenames as $filename) {
    foreach ($this
      ->findFiles($filename) as $file) {
      $filesInfo[] = $this
        ->validate(file_get_contents($file), $file);
    }
  }
  return $filesInfo;
}