Skip to content

Commit

Permalink
Use constants for SUCCESS/FAILURE and show errors even on quiet level
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Nov 6, 2023
1 parent b5eeaa9 commit a1a7774
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions core/Command/SetupChecks.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,26 @@ protected function execute(InputInterface $input, OutputInterface $output): int
'error' => '',
default => '',
};
$verbosity = ($check->getSeverity() === 'error' ? OutputInterface::VERBOSITY_QUIET : OutputInterface::VERBOSITY_NORMAL);
$description = $check->getDescription();
$output->writeln(
"\t\t<{$styleTag}>".
"{$emoji} ".
$title.
($check->getDescription() !== null ? ': '.$check->getDescription() : '').
"</{$styleTag}>"
($description !== null ? ': '.$description : '').
"</{$styleTag}>",
$verbosity
);
}
}
}
foreach ($results as $category => $checks) {
foreach ($checks as $title => $check) {
if ($check->getSeverity() !== 'success') {
return 1;
return self::FAILURE;
}
}
}
return 0;
return self::SUCCESS;
}
}

0 comments on commit a1a7774

Please sign in to comment.