summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Light <sam@lightscale.co.uk>2026-06-10 19:00:33 +0100
committerSam Light <sam@lightscale.co.uk>2026-06-10 19:00:33 +0100
commit7d76684ad6cd0182545489d7ed54ae9823d94ffa (patch)
treebeb2f79d2ff695a1dd467d95276947f655adaffb /src
parent968662ee16a1efc7cb7c176a42af91f36eecc9ca (diff)
Testing the creating routes on a group definition and code format
Diffstat (limited to 'src')
-rw-r--r--src/GroupDefinition.php2
-rw-r--r--src/RouteDefinition.php3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/GroupDefinition.php b/src/GroupDefinition.php
index 1ffddc7..c73de2c 100644
--- a/src/GroupDefinition.php
+++ b/src/GroupDefinition.php
@@ -20,7 +20,7 @@ class GroupDefinition
{
return $this->group->getRouter()->make(
$method,
- $this->group->getFullPrefix() . '/'. ltrim($path, '/'),
+ $this->group->getFullPrefix().'/'.ltrim($path, '/'),
$handler
)->inGroup($this->group);
}
diff --git a/src/RouteDefinition.php b/src/RouteDefinition.php
index 1ca9201..6890151 100644
--- a/src/RouteDefinition.php
+++ b/src/RouteDefinition.php
@@ -16,13 +16,14 @@ class RouteDefinition
public function inGroup(Group $group): static
{
$this->group = $group;
+
return $this;
}
public function name(string $value): static
{
if (($groupName = $this->group?->getFullName()) !== null) {
- $value = $groupName . $value;
+ $value = $groupName.$value;
}
$this->router->addNamedRoute($value, $this->route);