Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DocCommentHelper.php

function DocCommentHelper::parseDocComment

9 calls to DocCommentHelper::parseDocComment()
AnnotationHelper::getAnnotations in vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/AnnotationHelper.php
*
DisallowArrayTypeHintSyntaxSniff::process in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/DisallowArrayTypeHintSyntaxSniff.php
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *
DocCommentHelper::hasInheritdocAnnotation in vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/DocCommentHelper.php
DocCommentHelper::isInline in vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/DocCommentHelper.php
DocCommentSpacingSniff::process in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Commenting/DocCommentSpacingSniff.php
* @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint *

... See full list

File

vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/DocCommentHelper.php, line 249

Class

DocCommentHelper
@internal

Namespace

SlevomatCodingStandard\Helpers

Code

public static function parseDocComment(File $phpcsFile, int $docCommentOpenPointer) : ?ParsedDocComment {
    return SniffLocalCache::getAndSetIfNotCached($phpcsFile, sprintf('parsed-doc-comment-%d', $docCommentOpenPointer), static function () use ($phpcsFile, $docCommentOpenPointer) : ?ParsedDocComment {
        $docComment = self::getDocComment($phpcsFile, $docCommentOpenPointer);
        $docCommentTokens = new TokenIterator(PhpDocParserHelper::getLexer()->tokenize($docComment));
        try {
            $parsedDocComment = PhpDocParserHelper::getParser()->parse($docCommentTokens);
            return new ParsedDocComment($docCommentOpenPointer, $phpcsFile->getTokens()[$docCommentOpenPointer]['comment_closer'], $parsedDocComment, $docCommentTokens);
        } catch (ParserException $e) {
            return null;
        }
    });
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal