function DiagnoseCommand::checkComposerSchema
Return value
string|true
1 call to DiagnoseCommand::checkComposerSchema()
- DiagnoseCommand::execute in vendor/
composer/ composer/ src/ Composer/ Command/ DiagnoseCommand.php - Executes the current command.
File
-
vendor/
composer/ composer/ src/ Composer/ Command/ DiagnoseCommand.php, line 254
Class
- DiagnoseCommand
- @author Jordi Boggiano <j.boggiano@seld.be>
Namespace
Composer\CommandCode
private function checkComposerSchema() {
$validator = new ConfigValidator($this->getIO());
[
$errors,
,
$warnings,
] = $validator->validate(Factory::getComposerFile());
if ($errors || $warnings) {
$messages = [
'error' => $errors,
'warning' => $warnings,
];
$output = '';
foreach ($messages as $style => $msgs) {
foreach ($msgs as $msg) {
$output .= '<' . $style . '>' . $msg . '</' . $style . '>' . PHP_EOL;
}
}
return rtrim($output);
}
return true;
}