From 7a19b83bf7d7d8a2650356168cdb296b6f82807f Mon Sep 17 00:00:00 2001 From: Sam Light Date: Wed, 10 Jun 2026 19:00:32 +0100 Subject: code formatting --- src/Router.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/Router.php') diff --git a/src/Router.php b/src/Router.php index ddd3220..87f7931 100644 --- a/src/Router.php +++ b/src/Router.php @@ -7,8 +7,6 @@ namespace Lightscale\Router; use Lightscale\Router\Contracts\Strategy; use Lightscale\Router\Enums\HttpMethod; use Lightscale\Router\Enums\PathSegmentType; -use Lightscale\Router\Exceptions\NotFoundException; -use Lightscale\Router\Exceptions\UnknownMethodException; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; @@ -20,7 +18,7 @@ class Router public function __construct() { $this->root = new PathSegment(type: PathSegmentType::Root); - $this->strategy = new BasicStrategy; + $this->strategy = new BasicStrategy(); } public function getStrategy(): Strategy @@ -80,7 +78,7 @@ class Router $method = $request->getMethod(); $method = HttpMethod::tryFrom(strtolower($method)); - if ($method === null) { + if (null === $method) { return $this->strategy->notFound($request); } @@ -104,7 +102,7 @@ class Router $pathSplit = $this->splitPath($path); $seg = $this->root(); - while(($v = array_shift($pathSplit)) !== null) { + while (($v = array_shift($pathSplit)) !== null) { $seg = $seg->child($v); } -- cgit v1.2.3