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

Breadcrumb

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

function DocBlock::ofMethod

Throws

AnnotationsAreNotSupportedForInternalClassesException

1 call to DocBlock::ofMethod()
Registry::forMethod in vendor/phpunit/phpunit/src/Metadata/Parser/Annotation/Registry.php
@psalm-param class-string $classInHierarchy

File

vendor/phpunit/phpunit/src/Metadata/Parser/Annotation/DocBlock.php, line 89

Class

DocBlock
This is an abstraction around a PHPUnit-specific docBlock, allowing us to ask meaningful questions about a specific reflection symbol.

Namespace

PHPUnit\Metadata\Annotation\Parser

Code

public static function ofMethod(ReflectionMethod $method) : self {
    if ($method->getDeclaringClass()
        ->isInternal()) {
        throw new AnnotationsAreNotSupportedForInternalClassesException($method->getDeclaringClass()
            ->getName());
    }
    return new self((string) $method->getDocComment(), self::extractAnnotationsFromReflector($method), $method->getStartLine(), $method->getFileName());
}
RSS feed
Powered by Drupal