diff --git a/src/ResetPasswordHelper.php b/src/ResetPasswordHelper.php index af05346b..ab0dd6b3 100644 --- a/src/ResetPasswordHelper.php +++ b/src/ResetPasswordHelper.php @@ -68,7 +68,7 @@ public function generateResetToken(object $user, int $resetRequestLifetime = nul throw new TooManyPasswordRequestsException($availableAt); } - $resetRequestLifetime = $resetRequestLifetime ?: $this->resetRequestLifetime; + $resetRequestLifetime = $resetRequestLifetime ?? $this->resetRequestLifetime; $expiresAt = new \DateTimeImmutable(sprintf('+%d seconds', $resetRequestLifetime)); @@ -161,7 +161,7 @@ public function getTokenLifetime(): int */ public function generateFakeResetToken(int $resetRequestLifetime = null): ResetPasswordToken { - $resetRequestLifetime = $resetRequestLifetime ?: $this->resetRequestLifetime; + $resetRequestLifetime = $resetRequestLifetime ?? $this->resetRequestLifetime; $expiresAt = new \DateTimeImmutable(sprintf('+%d seconds', $resetRequestLifetime)); $generatedAt = ($expiresAt->getTimestamp() - $resetRequestLifetime);