From 0345ca86ad7d2ef2a19371cd040e538ac826e416 Mon Sep 17 00:00:00 2001 From: Bubka <858858+Bubka@users.noreply.github.com> Date: Wed, 13 Jul 2022 11:02:09 +0200 Subject: [PATCH] Fix syntax unsupported by php7.4 --- app/Models/TwoFAccount.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Models/TwoFAccount.php b/app/Models/TwoFAccount.php index bcd2b05e..ca3602e9 100644 --- a/app/Models/TwoFAccount.php +++ b/app/Models/TwoFAccount.php @@ -313,8 +313,9 @@ class TwoFAccount extends Model implements Sortable * * @throws InvalidSecretException The secret is not a valid base32 encoded string * @throws UndecipherableException The secret cannot be deciphered + * @return TotpDto|HotpDto */ - public function getOTP() : TotpDto|HotpDto + public function getOTP() { Log::info(sprintf('OTP requested for TwoFAccount #%s', $this->id)); @@ -461,7 +462,7 @@ class TwoFAccount extends Model implements Sortable */ private function getGeneratorOtpType() { - return Arr::get($this->generatorClassMap, $this->generator::class); + return Arr::get($this->generatorClassMap, get_class($this->generator)); } /**