File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -97,14 +97,13 @@ protected function getMinutesUntilExpired(Payload $payload)
9797 // get the latter of the two expiration dates and find
9898 // the number of minutes until the expiration date,
9999 // plus 1 minute to avoid overlap
100- $ minutes = $ exp ->max ($ iat ->addMinutes ($ this ->refreshTTL ))->addMinute ()-> diffInRealMinutes ();
100+ $ expiration = $ exp ->max ($ iat ->addMinutes ($ this ->refreshTTL ))->addMinute ();
101101
102- // if Carbon 3
103- if (is_float ($ minutes )) {
104- return (int ) round (abs ($ minutes ));
105- }
102+ $ minutes = method_exists ($ expiration , 'diffInRealMinutes ' )
103+ ? $ expiration ->diffInRealMinutes ()
104+ : $ expiration ->diffInUTCMinutes ();
106105
107- return $ minutes ;
106+ return ( int ) ceil ( abs ( $ minutes)) ;
108107 }
109108
110109 /**
You can’t perform that action at this time.
0 commit comments