Skip to content

Commit 7874502

Browse files
committed
Apply static analysis fixes
1 parent 5d7ad53 commit 7874502

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

rector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,10 @@
7979
__DIR__ . '/tests',
8080
],
8181

82-
// Ignore files that should not be namespaced
82+
// Ignore files that should not be namespaced to their folder
8383
NormalizeNamespaceByPSR4ComposerAutoloadRector::class => [
8484
__DIR__ . '/src/Helpers',
85+
__DIR__ . '/tests/_support',
8586
],
8687

8788
// May load view files directly when detecting classes

src/Config/Auth.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use CodeIgniter\Shield\Authentication\Authenticators\AccessTokens;
99
use CodeIgniter\Shield\Authentication\Authenticators\Session;
1010
use CodeIgniter\Shield\Authentication\Passwords\ValidatorInterface;
11+
use CodeIgniter\Shield\Models\UserModel;
1112

1213
class Auth extends BaseConfig
1314
{
@@ -324,7 +325,6 @@ class Auth extends BaseConfig
324325
* OTHER SETTINGS
325326
* ////////////////////////////////////////////////////////////////////
326327
*/
327-
328328
/**
329329
* --------------------------------------------------------------------
330330
* User Provider
@@ -335,7 +335,7 @@ class Auth extends BaseConfig
335335
* You can change it as long as they adhere to the
336336
* CodeIgniter\Shield\Models\UserModel.
337337
*
338-
* @var class-string<\CodeIgniter\Shield\Models\UserModel>
338+
* @var class-string<UserModel>
339339
*/
340340
public string $userProvider = 'CodeIgniter\Shield\Models\UserModel';
341341

tests/Authentication/HasAccessTokensTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public function testAccessTokens()
5555
['user_id' => $this->user->id, 'type' => 'access_token', 'secret' => 'secretToken2']
5656
);
5757

58+
/** @var AccessToken[] $tokens */
5859
$tokens = $this->user->accessTokens();
5960

6061
$this->assertCount(2, $tokens);

tests/Unit/UserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function testLastLogin()
8787

8888
$last = $this->user->lastLogin();
8989

90-
$this->assertInstanceOf(Login::class, $last);
90+
$this->assertInstanceOf(Login::class, $last); // @phpstan-ignore-line
9191
$this->assertSame($login->id, $last->id);
9292
$this->assertInstanceOf(Time::class, $last->date);
9393
}

0 commit comments

Comments
 (0)