Skip to content

Commit

Permalink
Ignore exception coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jenky committed Sep 3, 2023
1 parent d285723 commit a07a066
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Retry/Delay.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,25 @@ class Delay implements DelayStrategyInterface
public function __construct(int $delayMs = 1000, float $multiplier = 1.0, int $maxDelayMs = 0)
{
if ($delayMs < 0) {
// @codeCoverageIgnoreStart
throw new InvalidArgumentException(sprintf('Delay must be greater than or equal to zero: "%s" given.', $delayMs));
// @codeCoverageIgnoreEnd
}

$this->delayMs = $delayMs;

if ($multiplier < 1) {
// @codeCoverageIgnoreStart
throw new InvalidArgumentException(sprintf('Multiplier must be greater than or equal to one: "%s" given.', $multiplier));
// @codeCoverageIgnoreEnd
}

$this->multiplier = $multiplier;

if ($maxDelayMs < 0) {
// @codeCoverageIgnoreStart
throw new InvalidArgumentException(sprintf('Max delay must be greater than or equal to zero: "%s" given.', $maxDelayMs));
// @codeCoverageIgnoreEnd
}

$this->maxDelayMs = $maxDelayMs;
Expand Down

0 comments on commit a07a066

Please sign in to comment.