Skip to content

Commit 3fd9980

Browse files
committed
uses nette/routing 4.0
1 parent cfb13e1 commit 3fd9980

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

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
@@ -100,7 +100,7 @@ private function analyse(Routing\RouteList $router, ?Nette\Http\IRequest $httpRe
100100
continue;
101101
}
102102

103-
$matched = $flags[$i] & $router::ONE_WAY ? 'oneway' : 'no';
103+
$matched = empty($flags[$i]['oneWay']) ? 'no' : 'oneway';
104104
$params = $e = null;
105105
try {
106106
if (

tests/Routers/RouteList.addRoute.phpt

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

1111
$list = new RouteList;
1212
$list->addRoute('foo', ['presenter' => 'foo'], RouteList::ONE_WAY);
13-
$list->addRoute('bar', ['presenter' => 'bar'], RouteList::ONE_WAY);
13+
$list->addRoute('bar', ['presenter' => 'bar'], oneWay: true);
1414
$list->addRoute('hello', ['presenter' => 'hello']);
1515

1616

0 commit comments

Comments
 (0)