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

Breadcrumb

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

function DocBlock::extractAnnotationsFromReflector

2 calls to DocBlock::extractAnnotationsFromReflector()
DocBlock::ofClass in vendor/phpunit/phpunit/src/Metadata/Parser/Annotation/DocBlock.php
DocBlock::ofMethod in vendor/phpunit/phpunit/src/Metadata/Parser/Annotation/DocBlock.php

File

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

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

private static function extractAnnotationsFromReflector(ReflectionClass|ReflectionFunctionAbstract $reflector) : array {
    $annotations = [];
    if ($reflector instanceof ReflectionClass) {
        $annotations = array_merge($annotations, ...array_map(static fn(ReflectionClass $trait): array => self::parseDocBlock((string) $trait->getDocComment()), array_values($reflector->getTraits())));
    }
    return array_merge($annotations, self::parseDocBlock((string) $reflector->getDocComment()));
}

API Navigation

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