1
0
Fork 0

Clarify code

Co-Authored-By: Guilliam Xavier <guilliamxavier@users.noreply.github.com>
pull/8605/head
Jordi Boggiano 2020-02-14 10:45:35 +01:00 committed by GitHub
parent a222ec5b36
commit ff8bf0ab82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -148,25 +148,25 @@ EOT
}
// Avoid setting the exit code to 1 in case --strict and --no-check-publish/--no-check-lock are combined
$allWarnings = $warnings;
$extraWarnings = [];
// If checking publish errors, display them as errors, otherwise just show them as warnings
if ($checkPublish) {
$errors = array_merge($errors, $publishErrors);
} else {
$allWarnings = array_merge($allWarnings, $publishErrors);
$extraWarnings = array_merge($extraWarnings, $publishErrors);
}
// If checking lock errors, display them as errors, otherwise just show them as warnings
if ($checkLock) {
$errors = array_merge($errors, $lockErrors);
} else {
$allWarnings = array_merge($allWarnings, $lockErrors);
$extraWarnings = array_merge($extraWarnings, $lockErrors);
}
$messages = array(
'error' => $errors,
'warning' => $allWarnings,
'warning' => array_merge($warnings, $extraWarnings),
);
foreach ($messages as $style => $msgs) {