public function isValid(Request $request) { $methodMatches = $this->method == self::METHOD_ANY || $this->method == $request->getMethod(); $patternMatches = (bool) $this->pattern->matches($request->getUri(false)); return $methodMatches && $patternMatches; }