src/Analyse/Comment/Functions.php
public function getComment(\Reflector $reflectionFunction, \ReflectionClass $reflectionClass = null)
    {
        // Do some static caching. The comment will not change during a run.
        static $cache = array();
        /** @var \ReflectionFunction $reflectionFunction */
        $cachingKey = $reflectionFunction->getName();

        if (isset($cache[$cachingKey]) === true) {
            return $cache[$cachingKey];
        }

        // Cache not found. We need to generate this one.
        $cache[$cachingKey] = $this->pool->encodingService->encodeString(
            $this->prettifyComment($reflectionFunction->getDocComment())
        );
        return $cache[$cachingKey];
    }
public function getComment(\Reflector $reflectionFunction, \ReflectionClass $reflectionClass = null)
    {
        // Do some static caching. The comment will not change during a run.
        static $cache = array();
        /** @var \ReflectionFunction $reflectionFunction */
        $cachingKey = $reflectionFunction->getName();

        if (isset($cache[$cachingKey]) === true) {
            return $cache[$cachingKey];
        }

        // Cache not found. We need to generate this one.
        $cache[$cachingKey] = $this->pool->encodingService->encodeString(
            $this->prettifyComment($reflectionFunction->getDocComment())
        );
        return $cache[$cachingKey];
    }
public function getComment ( \ Reflector $ reflectionFunction , \ ReflectionClass $ reflectionClass = null ) { // Do some static caching. The comment will not change during a run. static $ cache = array ( ) ; /** @var \ReflectionFunction $reflectionFunction */ $ cachingKey = $ reflectionFunction -> getName ( ) ; if ( isset ( $ cache [ $ cachingKey ] ) === true ) { return $ cache [ $ cachingKey ] ; } // Cache not found. We need to generate this one. $ cache [ $ cachingKey ] = $ this -> pool -> encodingService -> encodeString ( $ this -> prettifyComment ( $ reflectionFunction -> getDocComment ( ) ) ) ; return $ cache [ $ cachingKey ] ; }
Get the prettified comment from a function.

@param \Reflector $reflectionFunction
The reflection of the function with the comment.
@param \ReflectionClass|null $reflectionClass
Nothing, null. We do not have a hosting class.

@return string
The prettified comment.
Get the prettified comment from a function .