Skip to content

Commit bd0d3fc

Browse files
authored
Merge pull request #21 from samsonasik/apply-php80
Apply PHP 8.0 Syntax and constructor promotion
2 parents 6558c59 + 12f3ce4 commit bd0d3fc

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/AuthorizationMiddleware.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,11 @@
1313

1414
class AuthorizationMiddleware implements MiddlewareInterface
1515
{
16-
private AuthorizationInterface $authorization;
17-
1816
/** @var callable */
1917
private $responseFactory;
2018

21-
public function __construct(AuthorizationInterface $authorization, callable $responseFactory)
19+
public function __construct(private AuthorizationInterface $authorization, callable $responseFactory)
2220
{
23-
$this->authorization = $authorization;
24-
2521
// Ensures type safety of the composed factory
2622
$this->responseFactory = static fn(): ResponseInterface => $responseFactory();
2723
}

0 commit comments

Comments
 (0)