Skip to content

Commit 99b60e0

Browse files
committed
move another property to be defined in construct
1 parent 3d3024b commit 99b60e0

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/Router/Route.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@
99

1010
final class Route implements RouteInterface
1111
{
12-
/**
13-
* @var array<MiddlewareInterface>
14-
*/
15-
private array $middlewares;
16-
1712
/**
1813
* @var array<string, string>
1914
*/
@@ -28,11 +23,9 @@ private function __construct(
2823
private string $path,
2924
private string $name,
3025
private RequestHandlerInterface $requestHandler,
31-
array $middlewares = [],
26+
private array $middlewares = [],
3227
private array $pathOptions = []
33-
) {
34-
$this->middlewares = $middlewares;
35-
}
28+
) {}
3629

3730
/**
3831
* @param array<MiddlewareInterface> $middlewares

0 commit comments

Comments
 (0)