chore(router): Remove redundant middleware count check

This commit is contained in:
kj
2026-02-02 10:23:48 -03:00
parent 78e199e300
commit c0b9f3851a

View File

@@ -257,11 +257,9 @@ class Router
static::$$method[] = static::parse($path, $callback);
static::$last = [$method, count(static::$$method) - 1];
if (count(static::$withMiddlewares) > 0) {
foreach (static::$withMiddlewares as $middleware) {
static::middleware($middleware);
}
}
return new static();
}