$this->twig->
setLoader($realLoader);
return ['template' =>
$template, 'file' =>
$file, 'line' =>
$e->
getTemplateLine(), 'valid' => false, 'exception' =>
$e];
} return ['template' =>
$template, 'file' =>
$file, 'valid' => true
];
} private function display(InputInterface
$input, OutputInterface
$output, SymfonyStyle
$io, array
$files): int
{ return match ($this->format
) { 'txt' =>
$this->
displayTxt($output,
$io,
$files),
'json' =>
$this->
displayJson($output,
$files),
'github' =>
$this->
displayTxt($output,
$io,
$files, true
),
default =>
throw new InvalidArgumentException(sprintf('Supported formats are "%s".',
implode('", "',
$this->
getAvailableFormatOptions()))),
};
} private function displayTxt(OutputInterface
$output, SymfonyStyle
$io, array
$filesInfo, bool
$errorAsGithubAnnotations = false
): int
{ $errors = 0;
$githubReporter =
$errorAsGithubAnnotations ?
new GithubActionReporter($output) : null;