Skip to content

Commit 419cc88

Browse files
committed
Fixed TokenInfo.php and changed PHPUnit version
2 parents 04d2acf + 9781146 commit 419cc88

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"psr/log": "^1|^2|^3"
2121
},
2222
"require-dev": {
23-
"phpunit/phpunit": "9.*"
23+
"phpunit/phpunit": "6.*"
2424
},
2525
"autoload": {
2626
"psr-4": {

src/Auth/TokenInfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct(string $token, int $expiresAt)
1919
{
2020
$this->token = $token;
2121
$this->expiresAt = $expiresAt;
22-
$this->refreshAt = time() + ceil(0.1*($this->expiresAt-time()));
22+
$this->refreshAt = time() + round(0.1*($this->expiresAt-time()),0);
2323
}
2424

2525
/**

tests/RefreshTokenTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function test(){
8282
$counter
8383
);
8484

85-
usleep(1e6);
85+
usleep(1.5e6);
8686
$session->query('select 1 as res');
8787
self::assertEquals(
8888
2,

0 commit comments

Comments
 (0)