diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 10717c4..17b5d85 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,7 +6,7 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest] - php-versions: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2"] + php-versions: ["7.4", "8.0", "8.1", "8.2"] dependency-versions: ["highest", "lowest"] runs-on: ${{ matrix.operating-system }} steps: diff --git a/composer.json b/composer.json index 8605cad..2ecd4ec 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ } ], "require": { - "php": "^7.2|^8.0", + "php": "^7.4|^8.0", "psr/log": "^1.0|^2.0|^3.0", "firebase/php-jwt": "^3.0|^4.0|^5.0", "psr/http-message": "^1.0", diff --git a/src/JwtAuthentication.php b/src/JwtAuthentication.php index a152724..6a453bd 100644 --- a/src/JwtAuthentication.php +++ b/src/JwtAuthentication.php @@ -47,7 +47,6 @@ use Psr\Log\LogLevel; use RuntimeException; use SplStack; -use Tuupola\Middleware\DoublePassTrait; use Tuupola\Http\Factory\ResponseFactory; use Tuupola\Middleware\JwtAuthentication\RequestMethodRule; use Tuupola\Middleware\JwtAuthentication\RequestPathRule; @@ -61,19 +60,13 @@ final class JwtAuthentication implements MiddlewareInterface * PSR-3 compliant logger. * @var LoggerInterface|null */ - private $logger; - - /** - * Last error message. - * @var string - */ - private $message; + private ?LoggerInterface $logger = null; /** * The rules stack. * @var SplStack */ - private $rules; + private SplStack $rules; /** * Stores all the options passed to the middleware. @@ -94,7 +87,7 @@ final class JwtAuthentication implements MiddlewareInterface * error: null|callable, * } */ - private $options = [ + private array $options = [ "secure" => true, "relaxed" => ["localhost", "127.0.0.1"], "algorithm" => ["HS256", "HS512", "HS384"], diff --git a/src/JwtAuthentication/RequestMethodRule.php b/src/JwtAuthentication/RequestMethodRule.php index 389cb2c..7d380e3 100644 --- a/src/JwtAuthentication/RequestMethodRule.php +++ b/src/JwtAuthentication/RequestMethodRule.php @@ -49,7 +49,7 @@ final class RequestMethodRule implements RuleInterface * ignore: array, * } */ - private $options = [ + private array $options = [ "ignore" => ["OPTIONS"] ]; diff --git a/src/JwtAuthentication/RequestPathRule.php b/src/JwtAuthentication/RequestPathRule.php index e9ef2f3..e34afb4 100644 --- a/src/JwtAuthentication/RequestPathRule.php +++ b/src/JwtAuthentication/RequestPathRule.php @@ -50,7 +50,7 @@ final class RequestPathRule implements RuleInterface * ignore: array, * } */ - private $options = [ + private array $options = [ "path" => ["/"], "ignore" => [] ]; diff --git a/tests/ArrayAccessImpl.php b/tests/ArrayAccessImpl.php index 8abe2ed..9f3fa33 100644 --- a/tests/ArrayAccessImpl.php +++ b/tests/ArrayAccessImpl.php @@ -34,7 +34,7 @@ class ArrayAccessImpl implements \ArrayAccess { - private $array = []; + private array $array = []; public function offsetExists($offset) { diff --git a/tests/JwtAuthenticationTest.php b/tests/JwtAuthenticationTest.php index 4ac9652..12c704f 100644 --- a/tests/JwtAuthenticationTest.php +++ b/tests/JwtAuthenticationTest.php @@ -45,12 +45,12 @@ class JwtAuthenticationTest extends TestCase { /* @codingStandardsIgnoreStart */ - public static $acmeToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6ImFjbWUifQ.eyJpc3MiOiJBY21lIFRvb3RocGljcyBMdGQiLCJpYXQiOiIxNDI4ODE5OTQxIiwiZXhwIjoiMTc0NDM1Mjc0MSIsImF1ZCI6Ind3dy5leGFtcGxlLmNvbSIsInN1YiI6InNvbWVvbmVAZXhhbXBsZS5jb20iLCJzY29wZSI6WyJyZWFkIiwid3JpdGUiLCJkZWxldGUiXX0.yBhYlsMabKTh31taAiH8i2ScPMKm84jxIDNxft6EiTA"; - public static $betaToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6ImJldGEifQ.eyJraWQiOiJiZXRhIiwiaXNzIjoiQmV0YSBTcG9uc29yc2hpcCBMdGQiLCJpYXQiOiIxNDI4ODE5OTQxIiwiZXhwIjoiMTc0NDM1Mjc0MSIsImF1ZCI6Ind3dy5leGFtcGxlLmNvbSIsInN1YiI6InNvbWVvbmVAZXhhbXBsZS5jb20iLCJzY29wZSI6WyJyZWFkIl19.msxcBx4_ZQtCkkjHyTDWDC0mac4cFNSxLqkzNL30JB8"; - public static $expired = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJBY21lIFRvb3RocGljcyBMdGQiLCJpYXQiOjE0Mjg4MTk5NDEsImV4cCI6MTQ4MDcyMzIwMCwiYXVkIjoid3d3LmV4YW1wbGUuY29tIiwic3ViIjoic29tZW9uZUBleGFtcGxlLmNvbSIsInNjb3BlIjpbInJlYWQiLCJ3cml0ZSIsImRlbGV0ZSJdfQ.ZydGEHVmca4ofQRCuMOfZrUXprAoe5GcySg4I-lwIjc"; + public static string $acmeToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6ImFjbWUifQ.eyJpc3MiOiJBY21lIFRvb3RocGljcyBMdGQiLCJpYXQiOiIxNDI4ODE5OTQxIiwiZXhwIjoiMTc0NDM1Mjc0MSIsImF1ZCI6Ind3dy5leGFtcGxlLmNvbSIsInN1YiI6InNvbWVvbmVAZXhhbXBsZS5jb20iLCJzY29wZSI6WyJyZWFkIiwid3JpdGUiLCJkZWxldGUiXX0.yBhYlsMabKTh31taAiH8i2ScPMKm84jxIDNxft6EiTA"; + public static string $betaToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6ImJldGEifQ.eyJraWQiOiJiZXRhIiwiaXNzIjoiQmV0YSBTcG9uc29yc2hpcCBMdGQiLCJpYXQiOiIxNDI4ODE5OTQxIiwiZXhwIjoiMTc0NDM1Mjc0MSIsImF1ZCI6Ind3dy5leGFtcGxlLmNvbSIsInN1YiI6InNvbWVvbmVAZXhhbXBsZS5jb20iLCJzY29wZSI6WyJyZWFkIl19.msxcBx4_ZQtCkkjHyTDWDC0mac4cFNSxLqkzNL30JB8"; + public static string $expired = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJBY21lIFRvb3RocGljcyBMdGQiLCJpYXQiOjE0Mjg4MTk5NDEsImV4cCI6MTQ4MDcyMzIwMCwiYXVkIjoid3d3LmV4YW1wbGUuY29tIiwic3ViIjoic29tZW9uZUBleGFtcGxlLmNvbSIsInNjb3BlIjpbInJlYWQiLCJ3cml0ZSIsImRlbGV0ZSJdfQ.ZydGEHVmca4ofQRCuMOfZrUXprAoe5GcySg4I-lwIjc"; /* @codingStandardsIgnoreEnd */ - public static $acmeTokenArray = [ + public static array $acmeTokenArray = [ "iss" => "Acme Toothpics Ltd", "iat" => "1428819941", "exp" => "1744352741", @@ -59,7 +59,7 @@ class JwtAuthenticationTest extends TestCase "scope" => ["read", "write", "delete"] ]; - public static $betaTokenArray = [ + public static array $betaTokenArray = [ "iss" => "Beta Sponsorship Ltd", "iat" => "1428819941", "exp" => "1744352741", @@ -68,7 +68,7 @@ class JwtAuthenticationTest extends TestCase "scope" => ["read"] ]; - public function testShouldReturn401WithoutToken() + public function testShouldReturn401WithoutToken(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api"); @@ -91,7 +91,7 @@ public function testShouldReturn401WithoutToken() $this->assertEquals("", $response->getBody()); } - public function testShouldReturn200WithTokenFromHeader() + public function testShouldReturn200WithTokenFromHeader(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -116,7 +116,7 @@ public function testShouldReturn200WithTokenFromHeader() $this->assertEquals("Success", $response->getBody()); } - public function testShouldReturn200WithTokenFromHeaderWithCustomRegexp() + public function testShouldReturn200WithTokenFromHeaderWithCustomRegexp(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -142,7 +142,7 @@ public function testShouldReturn200WithTokenFromHeaderWithCustomRegexp() $this->assertEquals("Success", $response->getBody()); } - public function testShouldReturn200WithTokenFromCookie() + public function testShouldReturn200WithTokenFromCookie(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -167,7 +167,7 @@ public function testShouldReturn200WithTokenFromCookie() $this->assertEquals("Success", $response->getBody()); } - public function testShouldReturn200WithTokenFromBearerCookie() + public function testShouldReturn200WithTokenFromBearerCookie(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -193,7 +193,7 @@ public function testShouldReturn200WithTokenFromBearerCookie() } - public function testShouldReturn200WithSecretArray() + public function testShouldReturn200WithSecretArray(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -219,7 +219,7 @@ public function testShouldReturn200WithSecretArray() $this->assertEquals("Success", $response->getBody()); } - public function testShouldReturn401WithSecretArray() + public function testShouldReturn401WithSecretArray(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -245,7 +245,7 @@ public function testShouldReturn401WithSecretArray() $this->assertEquals("", $response->getBody()); } - public function testShouldReturn200WithSecretArrayAccess() + public function testShouldReturn200WithSecretArrayAccess(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -272,7 +272,7 @@ public function testShouldReturn200WithSecretArrayAccess() $this->assertEquals("Success", $response->getBody()); } - public function testShouldReturn401WithSecretArrayAccess() + public function testShouldReturn401WithSecretArrayAccess(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -299,7 +299,7 @@ public function testShouldReturn401WithSecretArrayAccess() $this->assertEquals("", $response->getBody()); } - public function testShouldAlterResponseWithAnonymousAfter() + public function testShouldAlterResponseWithAnonymousAfter(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -326,7 +326,7 @@ public function testShouldAlterResponseWithAnonymousAfter() $this->assertEquals("plants crave", (string) $response->getHeaderLine("X-Brawndo")); } - public function testShouldAlterResponseWithInvokableAfter() + public function testShouldAlterResponseWithInvokableAfter(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -354,7 +354,7 @@ public function testShouldAlterResponseWithInvokableAfter() ); } - public function testShouldAlterResponseWithArrayNotationAfter() + public function testShouldAlterResponseWithArrayNotationAfter(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -382,7 +382,7 @@ public function testShouldAlterResponseWithArrayNotationAfter() ); } - public function testShouldReturn401WithInvalidAlgorithm() + public function testShouldReturn401WithInvalidAlgorithm(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -407,7 +407,7 @@ public function testShouldReturn401WithInvalidAlgorithm() $this->assertEquals("", $response->getBody()); } - public function testShouldReturn200WithOptions() + public function testShouldReturn200WithOptions(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -431,7 +431,7 @@ public function testShouldReturn200WithOptions() $this->assertEquals("Success", $response->getBody()); } - public function testShouldReturn400WithInvalidToken() + public function testShouldReturn400WithInvalidToken(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -455,7 +455,7 @@ public function testShouldReturn400WithInvalidToken() $this->assertEquals("", $response->getBody()); } - public function testShouldReturn400WithExpiredToken() + public function testShouldReturn400WithExpiredToken(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -479,7 +479,7 @@ public function testShouldReturn400WithExpiredToken() $this->assertEquals("", $response->getBody()); } - public function testShouldReturn200WithoutTokenWithPath() + public function testShouldReturn200WithoutTokenWithPath(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/public"); @@ -503,7 +503,7 @@ public function testShouldReturn200WithoutTokenWithPath() $this->assertEquals("Success", $response->getBody()); } - public function testShouldReturn200WithoutTokenWithIgnore() + public function testShouldReturn200WithoutTokenWithIgnore(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api/ping"); @@ -528,7 +528,7 @@ public function testShouldReturn200WithoutTokenWithIgnore() $this->assertEquals("Success", $response->getBody()); } - public function testShouldNotAllowInsecure() + public function testShouldNotAllowInsecure(): void { $this->expectException("RuntimeException"); @@ -551,7 +551,7 @@ public function testShouldNotAllowInsecure() $response = $collection->dispatch($request, $default); } - public function testShouldAllowInsecure() + public function testShouldAllowInsecure(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "http://example.com/api") @@ -576,7 +576,7 @@ public function testShouldAllowInsecure() $this->assertEquals("Success", $response->getBody()); } - public function testShouldRelaxInsecureInLocalhost() + public function testShouldRelaxInsecureInLocalhost(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "http://localhost/api") @@ -600,7 +600,7 @@ public function testShouldRelaxInsecureInLocalhost() $this->assertEquals("Success", $response->getBody()); } - public function testShouldRelaxInsecureInExampleCom() + public function testShouldRelaxInsecureInExampleCom(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "http://example.com/api") @@ -625,7 +625,7 @@ public function testShouldRelaxInsecureInExampleCom() $this->assertEquals("Success", $response->getBody()); } - public function testShouldAttachToken() + public function testShouldAttachToken(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -652,7 +652,7 @@ public function testShouldAttachToken() $this->assertEquals("Acme Toothpics Ltd", $response->getBody()); } - public function testShouldAttachCustomToken() + public function testShouldAttachCustomToken(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -680,7 +680,7 @@ public function testShouldAttachCustomToken() $this->assertEquals("Acme Toothpics Ltd", $response->getBody()); } - public function testShouldCallAfterWithProperArguments() + public function testShouldCallAfterWithProperArguments(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -713,7 +713,7 @@ public function testShouldCallAfterWithProperArguments() $this->assertEquals(self::$acmeToken, $token); } - public function testShouldCallBeforeWithProperArguments() + public function testShouldCallBeforeWithProperArguments(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -746,7 +746,7 @@ public function testShouldCallBeforeWithProperArguments() $this->assertEquals(self::$acmeToken, $token); } - public function testShouldCallAnonymousErrorFunction() + public function testShouldCallAnonymousErrorFunction(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api"); @@ -775,7 +775,7 @@ public function testShouldCallAnonymousErrorFunction() $this->assertEquals("error", $response->getBody()); } - public function testShouldCallInvokableErrorClass() + public function testShouldCallInvokableErrorClass(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api"); @@ -802,7 +802,7 @@ public function testShouldCallInvokableErrorClass() $this->assertEquals(TestErrorHandler::class, $response->getBody()); } - public function testShouldCallArrayNotationError() + public function testShouldCallArrayNotationError(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api"); @@ -829,7 +829,7 @@ public function testShouldCallArrayNotationError() $this->assertEquals(TestErrorHandler::class, $response->getBody()); } - public function testShouldCallErrorAndModifyBody() + public function testShouldCallErrorAndModifyBody(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api"); @@ -860,7 +860,7 @@ public function testShouldCallErrorAndModifyBody() $this->assertTrue($dummy); } - public function testShouldAllowUnauthenticatedHttp() + public function testShouldAllowUnauthenticatedHttp(): void { $request = (new ServerRequestFactory) @@ -885,7 +885,7 @@ public function testShouldAllowUnauthenticatedHttp() $this->assertEquals("Success", $response->getBody()); } - public function testShouldReturn401FromAfter() + public function testShouldReturn401FromAfter(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -914,7 +914,7 @@ public function testShouldReturn401FromAfter() $this->assertEquals("", $response->getBody()); } - public function testShouldModifyRequestUsingAnonymousBefore() + public function testShouldModifyRequestUsingAnonymousBefore(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/") @@ -942,7 +942,7 @@ public function testShouldModifyRequestUsingAnonymousBefore() $this->assertEquals("test", (string) $response->getBody()); } - public function testShouldModifyRequestUsingInvokableBefore() + public function testShouldModifyRequestUsingInvokableBefore(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/") @@ -968,7 +968,7 @@ public function testShouldModifyRequestUsingInvokableBefore() $this->assertEquals("invoke", (string) $response->getBody()); } - public function testShouldModifyRequestUsingArrayNotationBefore() + public function testShouldModifyRequestUsingArrayNotationBefore(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/") @@ -994,7 +994,7 @@ public function testShouldModifyRequestUsingArrayNotationBefore() $this->assertEquals("function", (string) $response->getBody()); } - public function testShouldHandleRulesArrayBug84() + public function testShouldHandleRulesArrayBug84(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api"); @@ -1034,7 +1034,7 @@ public function testShouldHandleRulesArrayBug84() $this->assertEquals("Success", $response->getBody()); } - public function testShouldHandleDefaultPathBug118() + public function testShouldHandleDefaultPathBug118(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api"); @@ -1066,7 +1066,7 @@ public function testShouldHandleDefaultPathBug118() $this->assertEquals("Success", $response->getBody()); } - public function testShouldBindToMiddleware() + public function testShouldBindToMiddleware(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/") @@ -1101,7 +1101,7 @@ public function testShouldBindToMiddleware() $this->assertEquals($expected, (string) $response->getBody()); } - public function testShouldHandlePsr7() + public function testShouldHandlePsr7(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") @@ -1125,7 +1125,7 @@ public function testShouldHandlePsr7() $this->assertEquals("Success", $response->getBody()); } - public function testShouldHaveUriInErrorHandlerIssue96() + public function testShouldHaveUriInErrorHandlerIssue96(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api/foo?bar=pop"); @@ -1154,7 +1154,7 @@ public function testShouldHaveUriInErrorHandlerIssue96() $this->assertEquals("https://example.com/api/foo?bar=pop", $dummy); } - public function testShouldUseCookieIfHeaderMissingIssue156() + public function testShouldUseCookieIfHeaderMissingIssue156(): void { $request = (new ServerRequestFactory) ->createServerRequest("GET", "https://example.com/api") diff --git a/tests/RequestMethodRuleTest.php b/tests/RequestMethodRuleTest.php index c468fb5..cfc47c9 100644 --- a/tests/RequestMethodRuleTest.php +++ b/tests/RequestMethodRuleTest.php @@ -38,7 +38,7 @@ class RequestMethodTest extends TestCase { - public function testShouldNotAuthenticateOptions() + public function testShouldNotAuthenticateOptions(): void { $request = (new ServerRequestFactory)->createServerRequest( "OPTIONS", @@ -50,7 +50,7 @@ public function testShouldNotAuthenticateOptions() $this->assertFalse($rule($request)); } - public function testShouldAuthenticatePost() + public function testShouldAuthenticatePost(): void { $request = (new ServerRequestFactory)->createServerRequest( "POST", @@ -62,7 +62,7 @@ public function testShouldAuthenticatePost() $this->assertTrue($rule($request)); } - public function testShouldAuthenticateGet() + public function testShouldAuthenticateGet(): void { $request = (new ServerRequestFactory)->createServerRequest( "GET", @@ -74,7 +74,7 @@ public function testShouldAuthenticateGet() $this->assertTrue($rule($request)); } - public function testShouldConfigureIgnore() + public function testShouldConfigureIgnore(): void { $request = (new ServerRequestFactory)->createServerRequest( "GET", diff --git a/tests/RequestPathRuleTest.php b/tests/RequestPathRuleTest.php index 0d221a2..a46a543 100644 --- a/tests/RequestPathRuleTest.php +++ b/tests/RequestPathRuleTest.php @@ -37,7 +37,7 @@ class RequestPathTest extends TestCase { - public function testShouldAcceptArrayAndStringAsPath() + public function testShouldAcceptArrayAndStringAsPath(): void { $request = (new ServerRequestFactory)->createServerRequest( "GET", @@ -51,7 +51,7 @@ public function testShouldAcceptArrayAndStringAsPath() $this->assertTrue($rule($request)); } - public function testShouldAuthenticateEverything() + public function testShouldAuthenticateEverything(): void { $request = (new ServerRequestFactory)->createServerRequest( "GET", @@ -69,7 +69,7 @@ public function testShouldAuthenticateEverything() $this->assertTrue($rule($request)); } - public function testShouldAuthenticateOnlyApi() + public function testShouldAuthenticateOnlyApi(): void { $request = (new ServerRequestFactory)->createServerRequest( "GET", @@ -87,7 +87,7 @@ public function testShouldAuthenticateOnlyApi() $this->assertTrue($rule($request)); } - public function testShouldIgnoreLogin() + public function testShouldIgnoreLogin(): void { $request = (new ServerRequestFactory)->createServerRequest( "GET", @@ -108,7 +108,7 @@ public function testShouldIgnoreLogin() $this->assertFalse($rule($request)); } - public function testShouldAuthenticateCreateAndList() + public function testShouldAuthenticateCreateAndList(): void { $request = (new ServerRequestFactory)->createServerRequest( "GET", @@ -144,7 +144,7 @@ public function testShouldAuthenticateCreateAndList() $this->assertFalse($rule($request)); } - public function testShouldAuthenticateRegexp() + public function testShouldAuthenticateRegexp(): void { $request = (new ServerRequestFactory)->createServerRequest( "GET", @@ -164,7 +164,7 @@ public function testShouldAuthenticateRegexp() $this->assertFalse($rule($request)); } - public function testBug50ShouldAuthenticateMultipleSlashes() + public function testBug50ShouldAuthenticateMultipleSlashes(): void { $request = (new ServerRequestFactory)->createServerRequest( "GET",