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

Breadcrumb

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

class Annotation

Same name in this branch
  1. 11.1.x vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php \Doctrine\Common\Annotations\Annotation
  2. 11.1.x vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php \Google\Protobuf\Internal\GeneratedCodeInfo\Annotation

@internal @template T of PhpDocTagValueNode

Hierarchy

  • class \SlevomatCodingStandard\Helpers\Annotation

Expanded class hierarchy of Annotation

7 files declare their use of Annotation
DeprecatedAnnotationDeclarationSniff.php in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Commenting/DeprecatedAnnotationDeclarationSniff.php
DocCommentSpacingSniff.php in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Commenting/DocCommentSpacingSniff.php
InlineDocCommentDeclarationSniff.php in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Commenting/InlineDocCommentDeclarationSniff.php
ParameterTypeHintSniff.php in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/ParameterTypeHintSniff.php
PropertyTypeHintSniff.php in vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/PropertyTypeHintSniff.php

... See full list

1 string reference to 'Annotation'
AnnotationHelper::processDocComment in vendor/phpstan/phpstan-phpunit/src/Rules/PHPUnit/AnnotationHelper.php
*

File

vendor/slevomat/coding-standard/SlevomatCodingStandard/Helpers/Annotation.php, line 13

Namespace

SlevomatCodingStandard\Helpers
View source
class Annotation {
    
    /** @var PhpDocTagNode */
    private $node;
    
    /** @var int */
    private $startPointer;
    
    /** @var int */
    private $endPointer;
    public function __construct(PhpDocTagNode $node, int $startPointer, int $endPointer) {
        $this->node = $node;
        $this->startPointer = $startPointer;
        $this->endPointer = $endPointer;
    }
    public function getNode() : PhpDocTagNode {
        return $this->node;
    }
    public function getName() : string {
        return $this->node->name;
    }
    
    /**
     * @return T
     */
    public function getValue() : PhpDocTagValueNode {
        
        /** @phpstan-ignore-next-line */
        return $this->node->value;
    }
    public function getStartPointer() : int {
        return $this->startPointer;
    }
    public function getEndPointer() : int {
        return $this->endPointer;
    }
    public function isInvalid() : bool {
        return $this->node->value instanceof InvalidTagValueNode;
    }

}

Members

Title Sort descending Modifiers Object type Summary
Annotation::$endPointer private property @var int
Annotation::$node private property @var PhpDocTagNode
Annotation::$startPointer private property @var int
Annotation::getEndPointer public function
Annotation::getName public function
Annotation::getNode public function
Annotation::getStartPointer public function
Annotation::getValue public function *
Annotation::isInvalid public function
Annotation::__construct public function

API Navigation

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