maxRetries = max(0, $maxRetries); $this->delayIncreaseMs = max(0, $delayIncreaseMs); } public function maxRetries(): int { return $this->maxRetries; } public function delayBeforeAttemptMs(int $attempt): int { // $attempt starts at 1 for the first retry return max(0, $attempt) * $this->delayIncreaseMs; } }