Skip to content

Commit 3a2985a

Browse files
committed
uses nette/routing 4.0
1 parent 91e78d6 commit 3a2985a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Application/Routers/RouteList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ public function addRoute(
6969
#[Language('TEXT')]
7070
string $mask,
7171
array|string|\Closure $metadata = [],
72-
int|bool $oneWay = 0,
72+
bool $oneWay = false,
7373
): static
7474
{
75-
$this->add(new Route($mask, $metadata), (int) $oneWay);
75+
$this->add(new Route($mask, $metadata), $oneWay);
7676
return $this;
7777
}
7878

src/Bridges/ApplicationTracy/RoutingPanel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ private function analyse(Routing\RouteList $router, ?Nette\Http\IRequest $httpRe
8989
continue;
9090
}
9191

92-
$matched = $flags[$i] & $router::ONE_WAY ? 'oneway' : 'no';
92+
$matched = empty($flags[$i]['oneWay']) ? 'no' : 'oneway';
9393
$params = $e = null;
9494
try {
9595
if (

tests/Routers/RouteList.addRoute.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require __DIR__ . '/Route.php';
1212

1313
$list = new RouteList;
1414
$list->addRoute('foo', ['presenter' => 'foo'], RouteList::ONE_WAY);
15-
$list->addRoute('bar', ['presenter' => 'bar'], RouteList::ONE_WAY);
15+
$list->addRoute('bar', ['presenter' => 'bar'], oneWay: true);
1616
$list->addRoute('hello', ['presenter' => 'hello']);
1717

1818

0 commit comments

Comments
 (0)