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

Breadcrumb

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

function DocBlock::ofClass

Throws

AnnotationsAreNotSupportedForInternalClassesException

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

File

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

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 ofClass(ReflectionClass $class) : self {
    if ($class->isInternal()) {
        throw new AnnotationsAreNotSupportedForInternalClassesException($class->getName());
    }
    return new self((string) $class->getDocComment(), self::extractAnnotationsFromReflector($class), $class->getStartLine(), $class->getFileName());
}
RSS feed
Powered by Drupal