protected function getAnnotations(Request $request) : array
    {
        $controller = $this->resolver->getController($request);

        if (!$controller) {
            return [];
        }

        [$class, $name] = $controller;
        return $this->reader->getMethodAnnotations(new \ReflectionMethod($class, $name));
    }