Skip to content

Commit e52df7d

Browse files
committed
Fix PHPStan: use break to make return false reachable in allChallengesPassed()
1 parent 0b6d6d6 commit e52df7d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Endpoints/DomainValidation.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,15 @@ public function allChallengesPassed(OrderData $orderData): bool
174174
}
175175

176176
if ($attempt === 3) {
177-
return false;
177+
break;
178178
}
179179

180180
$delay = $retryAfter ?? min(5 * (2 ** $attempt), 64);
181181
$this->client->logger('info', "Challenge is not valid yet. Another attempt in {$delay} seconds.");
182182
sleep($delay);
183183
}
184+
185+
return false;
184186
}
185187

186188
/** @param DomainValidationData[] $domainValidation */

0 commit comments

Comments
 (0)