original_string: private function findRoute(string $uri, string $method): RouteInterface
      {
          $matches = [];
          $route = new NullRoute();
  
          foreach ($this->routes as $value) {
              $urlMatch = \preg_match('`^'.\preg_replace($this->matchTypes, $this->types, $value->url).'/?$`', $uri, $matches);
              $methodMatch = \strpos($value->method, $method);
  
              if ($urlMatch && $methodMatch !== false) {
                  $route = clone $value;
                  $this->routeMatches = $matches;
                  break;
              }
          }
  
          return $route;
      }
code: private function findRoute(string $uri, string $method): RouteInterface
      {
          $matches = [];
          $route = new NullRoute();
  
          foreach ($this->routes as $value) {
              $urlMatch = \preg_match('`^'.\preg_replace($this->matchTypes, $this->types, $value->url).'/?$`', $uri, $matches);
              $methodMatch = \strpos($value->method, $method);
  
              if ($urlMatch && $methodMatch !== false) {
                  $route = clone $value;
                  $this->routeMatches = $matches;
                  break;
              }
          }
  
          return $route;
      }
code_tokens: private function findRoute ( string $ uri , string $ method ) : RouteInterface { $ matches = [ ] ; $ route = new NullRoute ( ) ; foreach ( $ this -> routes as $ value ) { $ urlMatch = \ preg_match ( '`^' . \ preg_replace ( $ this -> matchTypes , $ this -> types , $ value -> url ) . '/?$`' , $ uri , $ matches ) ; $ methodMatch = \ strpos ( $ value -> method , $ method ) ; if ( $ urlMatch && $ methodMatch !== false ) { $ route = clone $ value ; $ this -> routeMatches = $ matches ; break ; } } return $ route ; }
docstring: Find if provided route match with one of registered routes.
  
  @param string $uri
  @param string $method
  
  @return RouteInterface
docstring_tokens: Find if provided route match with one of registered routes .