Skip to content

Commit

Permalink
fix cs
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
theofidry committed Oct 22, 2023
1 parent 798bc0f commit e137cc3
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/Console/PharInfoRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,9 @@ public static function renderTimestamp(PharInfo $pharInfo, IO $io): void
);
}

/**
* @param false|positive-int|0 $maxDepth
* @param false|int $indent Nbr of indent or `false`
*/
public static function renderRequirementChecker(
PharInfo $pharInfo,
IO $io,
IO $io,
): void {
$requirements = $pharInfo->getFiles()[self::BOX_REQUIREMENTS] ?? null;

Expand All @@ -221,17 +217,17 @@ public static function renderRequirementChecker(
$evaluatedRequirements,
);

if (count($evaluatedRequirements) === 0) {
if (0 === count($evaluatedRequirements)) {
$io->writeln(' No requirement found.');

return;
} else {
$io->writeln('');
}
$io->writeln('');

[$required, $conflicting] = array_reduce(
$evaluatedRequirements,
static function ($carry, Requirement $requirement): array {
if ($requirement->type === RequirementType::EXTENSION_CONFLICT) {
if (RequirementType::EXTENSION_CONFLICT === $requirement->type) {
$carry[1][] = $requirement;
} else {
$carry[0][] = $requirement;
Expand All @@ -245,7 +241,7 @@ static function ($carry, Requirement $requirement): array {
$io->writeln(' <comment>Required:</comment>');
$io->writeln(
array_map(
static fn (Requirement $requirement) => match($requirement->type) {
static fn (Requirement $requirement) => match ($requirement->type) {
RequirementType::PHP => sprintf(
' - PHP %s',
$requirement->condition,
Expand Down

0 comments on commit e137cc3

Please sign in to comment.