Obtains the list of annotations in a doc comment
@return array
964521
public function parse() {
		$annotations = [];
		preg_match_all(self::ANNOTATION_PATTERN, $this->rawDocComment, $found);
		foreach ($found[1] as $key => $value) {
			$arg = null;
			if (!empty($found[2][$key])) {
				$arg = substr(trim($found[2][$key]), 1, -1);
			}
			$annotations[] = new Annotation($value, $this->parseValue($found[3][$key]), $arg);
		}
		return $annotations;
	}
762416
protected function getComposePsrNamespaceList() : array {
        $jsonFilePath = $this->annotationConfig->getConfig()['composerFilePath'];
        if ( !file_exists($jsonFilePath)) throw new AnnotationException('Build Annotation error , composer.json file not found ' . $jsonFilePath);
        return json_decode(file_get_contents($jsonFilePath) , true);
    }
777962
protected function getCommentSections()
    {
        if (empty($this->commentSections) && $this->rawComment) {
            $this->commentSections = explode("\n\n", $this->rawComment);
        }

        return $this->commentSections;
    }
833651
private function parse($docComment) {
		$lines = self::getDocLinesFromComment($docComment);
		
		// First, let's go to the first Annotation.
		// Anything before is the pure comment.
		$annotationLines = array();
		
		$oneAnnotationFound = false;
		// Is the line an annotation? Let's test this with a regexp.
		foreach ($lines as $line) {
			if (preg_match("/^[@][a-zA-Z]/", $line) === 0) {
				if ($oneAnnotationFound == false) {
					$this->comment .= $line."\n";
				}
			} else {
				$this->parseAnnotation($line);
				$oneAnnotationFound = true;
			}
		}
	}
1123887
public function getDocComment()
    {
        $docComment = false;
        $comments   = $this->namespaceNode->getAttribute('comments');

        if ($comments) {
            $docComment = (string)$comments[0];
        }

        return $docComment;
    }
317525
private function parseAnnotations($docBlock, $pattern, callable $callback)
    {
        $annotations = [];
        // Strip away the docblock header and footer to ease parsing of one line annotations
        $docBlock = substr($docBlock, 3, -2);

        if (preg_match_all($pattern, $docBlock, $matches) && is_callable($callback)) {
            return call_user_func($callback, $matches);
        }

        return $annotations;
    }
122984
public function parse(string $docComment, string $target): array
    {
        $annotations = [$target => new Annotations($target)];
        $annotation  = new CurrentAnnotation($target);
        $expression  = Expression::$DOCBLOCK;
        // substract last two characters which close the doc comment, i.e. */
        $len  = strlen($docComment) - 2;
        $token = new Token();
        for ($i = 6; $i < $len; $i++) {
            $character = $docComment{$i};
            if (isset($expression->after[$character])) {
                if ($expression->evaluate($token, $character, $annotation)) {
                    $token->value = '';
                    $expression   = $expression->after[$character];
                    if ($expression instanceof Docblock) {
                        if (null !== $annotation->name) {
                            if (!isset($annotations[$annotation->target])) {
                                $annotations[$annotation->target] = new Annotations($annotation->target);
                            }

                            $annotations[$annotation->target]->add(
                                    new Annotation(
                                            $annotation->type,
                                            $annotation->target,
                                            $annotation->params,
                                            $annotation->name
                                    )
                            );
                        }

                        $annotation = new CurrentAnnotation($target);
                    }
                } elseif ($annotation->ignored) {
                    $token->value = '';
                    $expression = Expression::$DOCBLOCK;
                }
            } else {
                $token->value .= $character;
            }
        }

        if (!($expression instanceof Docblock)) {
            throw new \ReflectionException(
                    'Annotation parser finished in wrong state for annotation '
                    . $target . '@' . $annotation->name
                    . ', annotation probably closed incorrectly, last state was '
                    . get_class($expression));
        }

        return $annotations;
    }
327822
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);
    }
189411
private function getResources()
    {

        $resources = [];
        foreach( $this->getClassAnnotations() as $annotation ) {

            // is this a resource
            if( 0 === strpos($annotation, "resource") ) {
                $resources[] = explode(' ', $annotation)[1];
            }

        }

        return $resources;

    }
936979
def get_annotations(cls, __fn):
        """"""
        if hasattr(__fn, '__func__'):
            __fn = __fn.__func__
        if hasattr(__fn, '__notes__'):
            return __fn.__notes__
        raise AttributeError('{!r} does not have annotations'.format(__fn))
213329
public function getComments()
    {
        //setup the comments
        $comment_ids = $this->getIds('comment');

        $comments = array();

        //only shows comments if there are comment_ids in the story
        //body or if the story has directly been commented on
        if (!empty($comment_ids)) {
            sort($comment_ids);
            $size = 0;
            foreach ($comment_ids as $id) {
                if (isset($this->_loaded_nodes[$id])) {
                    $comment = $this->_loaded_nodes[$id];
                    if ($comment instanceof ComBaseDomainEntityComment) {
                        $comments[$id] = $comment;
                        ++$size;
                    }
                }
                if ($size == 10) {
                    break;
                }
            }
        }

        return $comments;
    }
1078379
protected function getReferenceComment()
    {
        $referenceComment = null;
        $commentSections = $this->getCommentSections();
        $lastLine = end($commentSections);

        if (preg_match('/^\s*Styleguide \w/i', $lastLine) ||
            preg_match('/^\s*No styleguide reference/i', $lastLine)
        ) {
            $referenceComment = $lastLine;
        }

        return $referenceComment;
    }
748260
public function getFormComments()
    {
        ob_start();

        $placeTextarea = App::get('i18n')->transu('post.share_comment');

        $params = [
            'comment_notes_after' => '',
            'author' => '<p class="comment-form-author">' . '<label for="author">' . __('Your Name') . '</label>
					<input id="author" name="author" type="text"  value="Your First and Last Name" size="30" /></p>',
            'comment_field' => '
				<div class="form-group comment-form-comment">
		            <label for="comment">' . _x('Comment', 'noun') . '</label>
		            <textarea class="form-control" id="comment" name="comment" cols="45" rows="2"
							maxlength="1000" aria-required="true" placeholder="' . $placeTextarea . '"></textarea>
		        </div>',
        ];

        $placeAuthor = App::get('i18n')->transu('name');
        $placeEmail = App::get('i18n')->transu('email');
        $placeUrl = App::get('i18n')->transu('website');

        comment_form($params, $this->ID);
        $comment_form = ob_get_clean();
        $comment_form = str_replace('id="author"', 'class="author form-control" placeholder="' . $placeAuthor . '"',
            $comment_form);
        $comment_form = str_replace('id="email"', 'class="email form-control" placeholder="' . $placeEmail . '"',
            $comment_form);
        $comment_form = str_replace('id="url"', 'class="url form-control" placeholder="' . $placeUrl . '"',
            $comment_form);
        $comment_form = str_replace('id="submit"', 'class="btn btn-default"', $comment_form);
        return $comment_form;
    }
655127
protected function getMarkupComment()
    {
        $markupComment = null;

        foreach ($this->getCommentSections() as $commentSection) {
            // Identify the markup comment by the Markup: marker
            if (preg_match('/^\s*Markup:/i', $commentSection)) {
                $markupComment = $commentSection;
                break;
            }
        }

        return $markupComment;
    }
1149261
public function getComments()
    {
        $args_comments = [
            'post_id' => $this->ID,
            'orderby' => 'comment_date_gmt',
            'status' => static::STATUS_APPROVE,
        ];
        $comments = [];
        foreach (get_comments($args_comments, $this->ID) as $c) {
            $comments[] = Comment::find($c->comment_ID);
        }
        return $comments;
    }
427571
public function getCommentList()
    {
        if (is_null($this->commentList)) {
            $comments = oxNew(\OxidEsales\PayPalModule\Model\OrderPaymentCommentList::class);
            $comments->load($this->getPaymentId());
            $this->setCommentList($comments);
        }

        return $this->commentList;
    }
1108169
public function info()
    {
        $data = [
            'description' => [
                'value' => $this->description
            ]
        ];
        if ($this->attributes) {
            $data['attributes'] = $this->attributes->info();
        }

        return [
            'time' => $this->time,
            'annotation' => $data
        ];
    }