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\ParserCode
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());
}