Skip to content

Commit ede686d

Browse files
Better check for final status
1 parent 4be207c commit ede686d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Subscriber/Application/ApplicationFinishedSubscriber.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ public function notify(Finished $event): void
7575
metricTotal: $metricTotal,
7676
);
7777
$statusWeights = array_map(fn (MinCoverageResult $result) => $result->getStatus()->getWeight(), $results);
78-
rsort($statusWeights, SORT_NUMERIC);
79-
80-
$finalStatus = ResultStatus::fromWeight($statusWeights[0]);
78+
$finalStatus = ResultStatus::fromWeight(max($statusWeights));
8179

8280
$this->consoleOutput->print($results, $finalStatus);
8381

0 commit comments

Comments
 (0)