Skip to content

Commit 7e2432e

Browse files
committed
fix namespace case.
fix hmac invalidateAll() expires field.
1 parent 217d2c0 commit 7e2432e

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

phpstan-baseline.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,13 @@
168168
$ignoreErrors[] = [
169169
'message' => '#^Cannot access property \\$id on array\\<string, string\\>\\|object\\.$#',
170170
'identifier' => 'property.nonObject',
171-
'count' => 7,
171+
'count' => 9,
172+
'path' => __DIR__ . '/src/Commands/Hmac.php',
173+
];
174+
$ignoreErrors[] = [
175+
'message' => '#^Cannot access property \\$expires on array\\<string, string\\>\\|object\\.$#',
176+
'identifier' => 'property.nonObject',
177+
'count' => 3,
172178
'path' => __DIR__ . '/src/Commands/Hmac.php',
173179
];
174180
$ignoreErrors[] = [

tests/Authentication/HasAccessTokensTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
namespace Tests\Authentication;
1515

16-
use Codeigniter\I18n\Time;
16+
use CodeIgniter\I18n\Time;
1717
use CodeIgniter\Shield\Entities\AccessToken;
1818
use CodeIgniter\Shield\Entities\User;
1919
use CodeIgniter\Shield\Models\UserIdentityModel;

tests/Authentication/HasHmacTokensTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
namespace Tests\Authentication;
1515

16-
use Codeigniter\I18n\Time;
16+
use CodeIgniter\I18n\Time;
1717
use CodeIgniter\Shield\Entities\AccessToken;
1818
use CodeIgniter\Shield\Entities\User;
1919
use CodeIgniter\Shield\Models\UserIdentityModel;

tests/Commands/HmacTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ public function testBadCommand(): void
147147
*/
148148
public function testExpireAll(): void
149149
{
150-
/** @var User $user */
151150
$tokenExpiration = Time::parse('2024-11-03 12:00:00');
152151

152+
/** @var User $user */
153153
$user = fake(UserModel::class);
154154
$user->generateHmacToken('foo', ['*'], $tokenExpiration);
155155
$user->generateHmacToken('bar');

0 commit comments

Comments
 (0)