diff --git a/phpstan-baseline.php b/phpstan-baseline.php index 418430fa6145..423fd761c4f9 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -7197,34 +7197,9 @@ 'path' => __DIR__ . '/system/Router/Router.php', ]; $ignoreErrors[] = [ - 'message' => '#^Call to an undefined method CodeIgniter\\\\Router\\\\RouteCollectionInterface\\:\\:getDefaultNamespace\\(\\)\\.$#', - 'count' => 2, - 'path' => __DIR__ . '/system/Router/Router.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Call to an undefined method CodeIgniter\\\\Router\\\\RouteCollectionInterface\\:\\:getFiltersForRoute\\(\\)\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Router/Router.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Call to an undefined method CodeIgniter\\\\Router\\\\RouteCollectionInterface\\:\\:getRegisteredControllers\\(\\)\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Router/Router.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Call to an undefined method CodeIgniter\\\\Router\\\\RouteCollectionInterface\\:\\:getRoutesOptions\\(\\)\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Router/Router.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Call to an undefined method CodeIgniter\\\\Router\\\\RouteCollectionInterface\\:\\:isFiltered\\(\\)\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Router/Router.php', -]; -$ignoreErrors[] = [ - 'message' => '#^Call to an undefined method CodeIgniter\\\\Router\\\\RouteCollectionInterface\\:\\:setHTTPVerb\\(\\)\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Router/Router.php', + 'message' => '#^Call to an undefined method CodeIgniter\\\\Router\\\\RouteCollectionInterface\\:\\:getRegisteredControllers\\(\\)\\.$#', + 'count' => 1, + 'path' => __DIR__ . '/system/Router/Router.php', ]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', diff --git a/system/Router/Router.php b/system/Router/Router.php index de996f534618..2922d367dcdd 100644 --- a/system/Router/Router.php +++ b/system/Router/Router.php @@ -170,7 +170,7 @@ public function __construct(RouteCollectionInterface $routes, ?Request $request ); } else { $this->autoRouter = new AutoRouter( - $this->collection->getRoutes('CLI', false), // @phpstan-ignore-line + $this->collection->getRoutes('CLI', false), $this->collection->getDefaultNamespace(), $this->collection->getDefaultController(), $this->collection->getDefaultMethod(), @@ -400,7 +400,6 @@ public function getLocale() */ protected function checkRoutes(string $uri): bool { - // @phpstan-ignore-next-line $routes = $this->collection->getRoutes($this->collection->getHTTPVerb()); // Don't waste any time