function AnnotationException::requiredError

Creates a new AnnotationException describing an required error of an attribute.

Return value

AnnotationException

1 call to AnnotationException::requiredError()
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

core/lib/Drupal/Component/Annotation/Doctrine/AnnotationException.php, line 127

Class

AnnotationException
Description of AnnotationException

Namespace

Drupal\Component\Annotation\Doctrine

Code

public static function requiredError(string $attributeName, string $annotationName, string $context, string $expected) {
  return self::typeError(sprintf('Attribute "%s" of @%s declared on %s expects %s. This value should not be null.', $attributeName, $annotationName, $context, $expected));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.