Skip to content

Commit

Permalink
Restructuring Package::hasReachedStatus()
Browse files Browse the repository at this point in the history
Co-authored-by: Thorsten Frommen <info@tfrommen.de>
Signed-off-by: Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
  • Loading branch information
gmazzap and tfrommen authored Aug 29, 2024
1 parent 0d97bbe commit 657ed77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -653,11 +653,11 @@ public function hasFailed(): bool
*/
public function hasReachedStatus(int $status): bool
{
if (!isset(self::SUCCESS_STATUSES[$status])) {
if ($this->hasFailed()) {
return false;
}

return !$this->hasFailed() && $this->checkStatus($status, '>=');
return isset(self::SUCCESS_STATUSES[$status]) && $this->checkStatus($status, '>=');
}

/**
Expand Down

0 comments on commit 657ed77

Please sign in to comment.