Skip to content

Commit 3d94ce2

Browse files
committed
wip
1 parent a90e2b8 commit 3d94ce2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/router/src/RouteDiscovery.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ public function discover(DiscoveryLocation $location, ClassReflector $class): vo
3131
...$method->getAttributes(RouteDecorator::class),
3232
];
3333

34-
$this->discoveryItems->add($location, [$method, $routeAttribute, $decorators]);
34+
$route = DiscoveredRoute::fromRoute($routeAttribute, $decorators, $method);
35+
36+
$this->discoveryItems->add($location, $route);
3537
}
3638
}
3739
}
3840

3941
public function apply(): void
4042
{
41-
foreach ($this->discoveryItems as [$method, $routeAttribute, $decorators]) {
42-
// TODO: maybe move discovered route creation to `discover`?
43-
$route = DiscoveredRoute::fromRoute($routeAttribute, $decorators, $method);
43+
foreach ($this->discoveryItems as $route) {
4444
$this->configurator->addRoute($route);
4545
}
4646

0 commit comments

Comments
 (0)