From ac836311005458a10dded324420be92f44976332 Mon Sep 17 00:00:00 2001 From: Sam Light Date: Wed, 10 Jun 2026 19:00:32 +0100 Subject: generating routes with parameters and tests --- src/PathSegment.php | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/PathSegment.php') diff --git a/src/PathSegment.php b/src/PathSegment.php index d55102f..2fc4cbb 100644 --- a/src/PathSegment.php +++ b/src/PathSegment.php @@ -29,19 +29,6 @@ class PathSegment } } - public static function makeFromRouteString(string $value): static - { - $type = PathSegmentType::Parameter; - $regex = $type->routeMatchRegex(); - if (preg_match($regex, $value, $matches) === 1) { - $value = $matches[1]; - } - else { - $type = PathSegmentType::Raw; - } - return new static($value, $type); - } - public function getContent(): string { return match ($this->type) { -- cgit v1.2.3