$prevErrorHandler =
set_error_handler(function D
$level,
$message,
$file,
$line) use (&
$prevErrorHandler) { if (\E_USER_DEPRECATED ===
$level) { throw new ParseException($message,
$this->
getParser()->
getRealCurrentLineNb() + 1
);
} return $prevErrorHandler ?
$prevErrorHandler($level,
$message,
$file,
$line) : false;
});
try { $this->
getParser()->
parse($content, Yaml::PARSE_CONSTANT |
$flags);
} catch (ParseException
$e) { return ['file' =>
$file, 'line' =>
$e->
getParsedLine(), 'valid' => false, 'message' =>
$e->
getMessage()];
} finally { restore_error_handler();
} return ['file' =>
$file, 'valid' => true
];
} private function display(SymfonyStyle
$io, array
$files): int
{ return match ($this->format
) { 'txt' =>
$this->
displayTxt($io,
$files),