protected function checkContainer(int $method, string $uri)
    {
        while (($route = $this->routes->next()) !== false) {
            if (($route->method & $method) !== $method) {
                continue;
            }

            if (preg_match_all($this->posix2Pcre($route->uri), $uri, $matches) === 0) {
                continue;
            }

            $this->logger->info("Route match found");
            if (is_array($matches)) {
                $this->addParams($matches);
            }

            return $route;
        }
        return null;
    }