Skip to content

Commit aa1a5cb

Browse files
committed
refactor: remove \Excetpion
It is not expected to catch these exceptions.
1 parent 588d6fa commit aa1a5cb

3 files changed

Lines changed: 0 additions & 9 deletions

File tree

src/Authentication/Authenticators/Session.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
use CodeIgniter\Shield\Models\UserIdentityModel;
2121
use CodeIgniter\Shield\Models\UserModel;
2222
use CodeIgniter\Shield\Result;
23-
use Exception;
2423
use stdClass;
2524

2625
class Session implements AuthenticatorInterface
@@ -812,8 +811,6 @@ public function recordActiveDate(): void
812811
* and stores the necessary info in the db and a cookie.
813812
*
814813
* @see https://paragonie.com/blog/2015/04/secure-authentication-php-with-long-term-persistence
815-
*
816-
* @throws Exception
817814
*/
818815
protected function rememberUser(User $user): void
819816
{

src/Models/LoginModel.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use CodeIgniter\Shield\Authentication\Authenticators\Session;
88
use CodeIgniter\Shield\Entities\Login;
99
use CodeIgniter\Shield\Entities\User;
10-
use Exception;
1110
use Faker\Generator;
1211

1312
class LoginModel extends Model
@@ -81,8 +80,6 @@ public function lastLogin(User $user): ?Login
8180

8281
/**
8382
* Generate a fake login for testing
84-
*
85-
* @throws Exception
8683
*/
8784
public function fake(Generator &$faker): Login
8885
{

src/Models/TokenLoginModel.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use CodeIgniter\I18n\Time;
66
use CodeIgniter\Shield\Entities\Login;
7-
use Exception;
87
use Faker\Generator;
98

109
class TokenLoginModel extends LoginModel
@@ -13,8 +12,6 @@ class TokenLoginModel extends LoginModel
1312

1413
/**
1514
* Generate a fake login for testing
16-
*
17-
* @throws Exception
1815
*/
1916
public function fake(Generator &$faker): Login
2017
{

0 commit comments

Comments
 (0)