Mpociot\ApiDoc\Generators\AbstractGenerator::getRouteDescription PHP Method

getRouteDescription() protected method

protected getRouteDescription ( Illuminate\Routing\Route $route ) : string
$route Illuminate\Routing\Route
return string
    protected function getRouteDescription($route)
    {
        list($class, $method) = explode('@', $route);
        $reflection = new ReflectionClass($class);
        $reflectionMethod = $reflection->getMethod($method);
        $comment = $reflectionMethod->getDocComment();
        $phpdoc = new DocBlock($comment);
        return ['short' => $phpdoc->getShortDescription(), 'long' => $phpdoc->getLongDescription()->getContents()];
    }