private function extractContent($docComment, $annotationClass)
    {
        $isRecording = false;
        $content     = '';

        // remove doc comment stars at line start
        $docComment = preg_replace('/^[ \t]*(\*\/? ?|\/\*\*)/m', '', $docComment);

        $search = '(' .
            preg_quote($annotationClass, '/')
            . '|'
            . substr($annotationClass, strrpos($annotationClass, '\\') + 1)
            . ')';

        $lines = preg_split('/\n|\r\n/', $docComment);
        foreach ($lines as $line) {
            if ($isRecording === false && preg_match('/^@' . $search . '(\s|\(|$)/', $line)) {
                $isRecording = true;
            } elseif ($isRecording) {
                if (preg_match('/^@/', $line)) {
                    break;
                }
                $content .= $line . PHP_EOL;
            }
        }

        return trim($content);
    }
private function extractContent($docComment, $annotationClass)
    {
        $isRecording = false;
        $content     = '';

        // remove doc comment stars at line start
        $docComment = preg_replace('/^[ \t]*(\*\/? ?|\/\*\*)/m', '', $docComment);

        $search = '(' .
            preg_quote($annotationClass, '/')
            . '|'
            . substr($annotationClass, strrpos($annotationClass, '\\') + 1)
            . ')';

        $lines = preg_split('/\n|\r\n/', $docComment);
        foreach ($lines as $line) {
            if ($isRecording === false && preg_match('/^@' . $search . '(\s|\(|$)/', $line)) {
                $isRecording = true;
            } elseif ($isRecording) {
                if (preg_match('/^@/', $line)) {
                    break;
                }
                $content .= $line . PHP_EOL;
            }
        }

        return trim($content);
    }
private function extractContent ( $ docComment , $ annotationClass ) { $ isRecording = false ; $ content = '' ; // remove doc comment stars at line start $ docComment = preg_replace ( '/^[ \t]*(\*\/? ?|\/\*\*)/m' , '' , $ docComment ) ; $ search = '(' . preg_quote ( $ annotationClass , '/' ) . '|' . substr ( $ annotationClass , strrpos ( $ annotationClass , '\\' ) + 1 ) . ')' ; $ lines = preg_split ( '/\n|\r\n/' , $ docComment ) ; foreach ( $ lines as $ line ) { if ( $ isRecording === false && preg_match ( '/^@' . $ search . '(\s|\(|$)/' , $ line ) ) { $ isRecording = true ; } elseif ( $ isRecording ) { if ( preg_match ( '/^@/' , $ line ) ) { break ; } $ content .= $ line . PHP_EOL ; } } return trim ( $ content ) ; }
Extract content below doc comment annotation

@param string $docComment
@param string $annotationClass

@return string
Extract content below doc comment annotation