function AnnotationException::attributeTypeError
Same name and namespace in other branches
- 11.x core/lib/Drupal/Component/Annotation/Doctrine/AnnotationException.php \Drupal\Component\Annotation\Doctrine\AnnotationException::attributeTypeError()
Creates a new AnnotationException describing an type error of an attribute.
Parameters
mixed $actual:
Return value
1 call to AnnotationException::attributeTypeError()
- 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 105
Class
- AnnotationException
- Description of AnnotationException
Namespace
Drupal\Component\Annotation\DoctrineCode
public static function attributeTypeError(string $attributeName, string $annotationName, string $context, string $expected, $actual) {
return self::typeError(sprintf('Attribute "%s" of @%s declared on %s expects %s, but got %s.', $attributeName, $annotationName, $context, $expected, is_object($actual) ? 'an instance of ' . get_class($actual) : gettype($actual)));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.