Skip to content

Commit

Permalink
fix remainingTime to be positive integer
Browse files Browse the repository at this point in the history
  • Loading branch information
imahmood authored and salehhashemi1992 committed May 22, 2024
1 parent ff82915 commit 62815ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/OtpManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function sendAndRetryCheck(string $mobile, ?OtpTypeInterface $type = null
return $this->send($mobile, $type);
}

$remainingTime = $retryAfter->diffInSeconds(Carbon::now());
$remainingTime = (int) Carbon::now()->diffInSeconds($retryAfter);

throw ValidationException::withMessages([
'otp' => [
Expand Down

0 comments on commit 62815ac

Please sign in to comment.