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

Breadcrumb

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

function AnnotationException::enumeratorError

Creates a new AnnotationException describing a invalid enummerator.

@phpstan-param list<string> $available

Parameters

mixed $given:

Return value

AnnotationException

2 calls to AnnotationException::enumeratorError()
DocParser::Annotation in vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
Annotation ::= "@" AnnotationName MethodCall AnnotationName ::= QualifiedName | SimpleName QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName NameSpacePart ::= identifier | null | false |…
DocParser::Annotation in core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php
Annotation ::= "@" AnnotationName MethodCall AnnotationName ::= QualifiedName | SimpleName QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName NameSpacePart ::= identifier | null | false |…

File

vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php, line 126

Class

AnnotationException
Description of AnnotationException

Namespace

Doctrine\Common\Annotations

Code

public static function enumeratorError(string $attributeName, string $annotationName, string $context, array $available, $given) {
    return new self(sprintf('[Enum Error] Attribute "%s" of @%s declared on %s accepts only [%s], but got %s.', $attributeName, $annotationName, $context, implode(', ', $available), is_object($given) ? get_class($given) : $given));
}

API Navigation

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