From 86432616c6bbc6efbe4851db083237cea4b0f9cd Mon Sep 17 00:00:00 2001 From: flashwave Date: Wed, 26 Jul 2023 18:24:49 +0000 Subject: [PATCH] Expiration -> Expires --- src/Auth/RecoveryTokenInfo.php | 6 +++--- src/Users/UserAuthSession.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Auth/RecoveryTokenInfo.php b/src/Auth/RecoveryTokenInfo.php index 5c18537..5f1a1f6 100644 --- a/src/Auth/RecoveryTokenInfo.php +++ b/src/Auth/RecoveryTokenInfo.php @@ -40,16 +40,16 @@ class RecoveryTokenInfo { return DateTime::fromUnixTimeSeconds($this->created); } - public function getExpirationTime(): int { + public function getExpiresTime(): int { return $this->created + self::LIFETIME; } - public function getExpirationAt(): bool { + public function getExpiresAt(): bool { return DateTime::fromUnixTimeSeconds($this->created + self::LIFETIME); } public function hasExpired(): bool { - return $this->getExpirationTime() <= time(); + return $this->getExpiresTime() <= time(); } public function hasCode(): bool { diff --git a/src/Users/UserAuthSession.php b/src/Users/UserAuthSession.php index cf0aeb0..fdfab56 100644 --- a/src/Users/UserAuthSession.php +++ b/src/Users/UserAuthSession.php @@ -36,11 +36,11 @@ class UserAuthSession { public function getCreationTime(): int { return $this->tfa_created === null ? -1 : $this->tfa_created; } - public function getExpirationTime(): int { + public function getExpiresTime(): int { return $this->getCreationTime() + self::TOKEN_LIFETIME; } public function hasExpired(): bool { - return $this->getExpirationTime() <= time(); + return $this->getExpiresTime() <= time(); } public function delete(): void {