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)
97
97
// get the latter of the two expiration dates and find
98
98
// the number of minutes until the expiration date,
99
99
// 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 ();
101
101
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 ();
106
105
107
- return $ minutes ;
106
+ return ( int ) ceil ( abs ( $ minutes)) ;
108
107
}
109
108
110
109
/**
You can’t perform that action at this time.
0 commit comments