diff --git a/src/Middleware/HeaderAuthenticationMiddleware.php b/src/Middleware/HeaderAuthenticationMiddleware.php index d49b36c..7c35d0f 100644 --- a/src/Middleware/HeaderAuthenticationMiddleware.php +++ b/src/Middleware/HeaderAuthenticationMiddleware.php @@ -20,7 +20,7 @@ class HeaderAuthenticationMiddleware implements MiddlewareInterface protected Authenticate $authorize, protected UserInterface $entity, protected \Closure $loginFailedResponse, - HeaderAuthentication $authenticator = null, + ? HeaderAuthentication $authenticator = null, ) { $this->authenticator = $authenticator ?: new HeaderAuthentication($authorize); } diff --git a/src/Middleware/PostRequestAuthenticationMiddleware.php b/src/Middleware/PostRequestAuthenticationMiddleware.php index e7c3a45..60d2513 100644 --- a/src/Middleware/PostRequestAuthenticationMiddleware.php +++ b/src/Middleware/PostRequestAuthenticationMiddleware.php @@ -19,7 +19,7 @@ class PostRequestAuthenticationMiddleware implements MiddlewareInterface public function __construct( protected UserInterface $entity, protected \Closure $loginFailedResponse, - PostRequestAuthentication $authenticator = null, + ? PostRequestAuthentication $authenticator = null, ) { $this->authenticator = $authenticator ?: new PostRequestAuthentication(new Authenticate($entity)); }