diff --git a/composer.json b/composer.json index 829bc665..af66bf29 100644 --- a/composer.json +++ b/composer.json @@ -49,7 +49,7 @@ "illuminate/routing": "^10|^11", "orchestra/testbench": "^8|^9", "mockery/mockery": "^1.4.4", - "phpstan/phpstan": "^1", + "phpstan/phpstan": "^2", "phpunit/phpunit": "^10.5|^11" }, "autoload": { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index ea4e0664..72ea99ab 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -60,28 +60,3 @@ parameters: count: 2 path: tests/Providers/LaravelServiceProviderTest.php - - - message: "#^Method PHPOpenSourceSaver\\\\JWTAuth\\\\Test\\\\Stubs\\\\LaravelUserStub\\:\\:getAuthIdentifierName\\(\\) should return string but return statement is missing\\.$#" - count: 1 - path: tests/Stubs/LaravelUserStub.php - - - - message: "#^Method PHPOpenSourceSaver\\\\JWTAuth\\\\Test\\\\Stubs\\\\LaravelUserStub\\:\\:getAuthPassword\\(\\) should return string but return statement is missing\\.$#" - count: 1 - path: tests/Stubs/LaravelUserStub.php - - - - message: "#^Method PHPOpenSourceSaver\\\\JWTAuth\\\\Test\\\\Stubs\\\\LaravelUserStub\\:\\:getAuthPasswordName\\(\\) should return string but return statement is missing\\.$#" - count: 1 - path: tests/Stubs/LaravelUserStub.php - - - - message: "#^Method PHPOpenSourceSaver\\\\JWTAuth\\\\Test\\\\Stubs\\\\LaravelUserStub\\:\\:getRememberToken\\(\\) should return string but return statement is missing\\.$#" - count: 1 - path: tests/Stubs/LaravelUserStub.php - - - - message: "#^Method PHPOpenSourceSaver\\\\JWTAuth\\\\Test\\\\Stubs\\\\LaravelUserStub\\:\\:getRememberTokenName\\(\\) should return string but return statement is missing\\.$#" - count: 1 - path: tests/Stubs/LaravelUserStub.php - diff --git a/tests/Stubs/JWTProviderStub.php b/tests/Stubs/JWTProviderStub.php index a5e64a79..d6282c69 100644 --- a/tests/Stubs/JWTProviderStub.php +++ b/tests/Stubs/JWTProviderStub.php @@ -16,7 +16,7 @@ class JWTProviderStub extends Provider { - protected function isAsymmetric() + protected function isAsymmetric(): bool { return false; } diff --git a/tests/Stubs/LaravelUserStub.php b/tests/Stubs/LaravelUserStub.php index 83e25547..62dd8844 100644 --- a/tests/Stubs/LaravelUserStub.php +++ b/tests/Stubs/LaravelUserStub.php @@ -17,31 +17,36 @@ class LaravelUserStub extends UserStub implements Authenticatable, JWTSubject { - public function getAuthIdentifierName() + public function getAuthIdentifierName(): string { + return ''; } public function getAuthIdentifier() { } - public function getAuthPasswordName() + public function getAuthPasswordName(): string { + return ''; } - public function getAuthPassword() + public function getAuthPassword(): string { + return ''; } - public function getRememberToken() + public function getRememberToken(): string { + return ''; } public function setRememberToken($value) { } - public function getRememberTokenName() + public function getRememberTokenName(): string { + return ''; } }