Skip to content

Commit 4232d70

Browse files
committed
tweaks
Signed-off-by: alexmerlin <alex.merlin.1985@gmail.com>
1 parent 4e29a50 commit 4232d70

7 files changed

Lines changed: 12 additions & 12 deletions

File tree

src/App/src/Route/Delete.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
class Delete extends AbstractRoute
1010
{
11-
public function __construct(?string $path = null, null|array|string $handlers = null, ?string $name = null)
11+
public function __construct(?string $path = null, null|array|string $middlewares = null, ?string $name = null)
1212
{
13-
parent::__construct($path, $handlers, $name, RequestMethodInterface::METHOD_DELETE);
13+
parent::__construct($path, $middlewares, $name, RequestMethodInterface::METHOD_DELETE);
1414
}
1515
}

src/App/src/Route/Get.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
class Get extends AbstractRoute
1010
{
11-
public function __construct(?string $path = null, null|array|string $handlers = null, ?string $name = null)
11+
public function __construct(?string $path = null, null|array|string $middlewares = null, ?string $name = null)
1212
{
13-
parent::__construct($path, $handlers, $name, RequestMethodInterface::METHOD_GET);
13+
parent::__construct($path, $middlewares, $name, RequestMethodInterface::METHOD_GET);
1414
}
1515
}

src/App/src/Route/Patch.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
class Patch extends AbstractRoute
1010
{
11-
public function __construct(?string $path = null, null|array|string $handlers = null, ?string $name = null)
11+
public function __construct(?string $path = null, null|array|string $middlewares = null, ?string $name = null)
1212
{
13-
parent::__construct($path, $handlers, $name, RequestMethodInterface::METHOD_PATCH);
13+
parent::__construct($path, $middlewares, $name, RequestMethodInterface::METHOD_PATCH);
1414
}
1515
}

src/App/src/Route/Post.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
class Post extends AbstractRoute
1010
{
11-
public function __construct(?string $path = null, null|array|string $handlers = null, ?string $name = null)
11+
public function __construct(?string $path = null, null|array|string $middlewares = null, ?string $name = null)
1212
{
13-
parent::__construct($path, $handlers, $name, RequestMethodInterface::METHOD_POST);
13+
parent::__construct($path, $middlewares, $name, RequestMethodInterface::METHOD_POST);
1414
}
1515
}

src/App/src/Route/Put.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
class Put extends AbstractRoute
1010
{
11-
public function __construct(?string $path = null, null|array|string $handlers = null, ?string $name = null)
11+
public function __construct(?string $path = null, null|array|string $middlewares = null, ?string $name = null)
1212
{
13-
parent::__construct($path, $handlers, $name, RequestMethodInterface::METHOD_PUT);
13+
parent::__construct($path, $middlewares, $name, RequestMethodInterface::METHOD_PUT);
1414
}
1515
}

src/App/src/Route/RouteGroup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class RouteGroup
2020

2121
public function __construct(
2222
?string $prefix = null,
23-
?array $middlewares = null,
23+
array|string|null $middlewares = null,
2424
) {
2525
$prefix && $this->setPrefix($prefix);
2626
$middlewares && $this->setMiddlewares($middlewares);

src/Security/src/RoutesDelegator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function __invoke(ContainerInterface $container, string $serviceName, cal
6565
->excludeMiddlewares(ErrorResponseMiddleware::class)
6666
->register($app);
6767

68-
(new RouteGroup('/group', [ErrorResponseMiddleware::class]))
68+
(new RouteGroup('/group', ErrorResponseMiddleware::class))
6969
->addRoute(
7070
new Delete('/delete', TokenEndpointHandler::class, 'group::delete')
7171
)

0 commit comments

Comments
 (0)