Skip to content

Commit 49b47a0

Browse files
authored
Merge pull request #67 from jrushlow/fix/datetime-modify
removed un-needed modify call on \DateTimeImmutable
2 parents d9083d9 + a536b7a commit 49b47a0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/ResetPasswordHelper.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ public function generateResetToken(object $user): ResetPasswordToken
7676
throw new TooManyPasswordRequestsException();
7777
}
7878

79-
$expiresAt = (new \DateTimeImmutable('now'))
80-
->modify(\sprintf('+%d seconds', $this->resetRequestLifetime))
81-
;
79+
$expiresAt = new \DateTimeImmutable(\sprintf('+%d seconds', $this->resetRequestLifetime));
8280

8381
$tokenComponents = $this->tokenGenerator->createToken($expiresAt, $this->repository->getUserIdentifier($user));
8482

0 commit comments

Comments
 (0)