You are here

public static function AnnotationException::attributeTypeError in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php \Doctrine\Common\Annotations\AnnotationException::attributeTypeError()

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

@since 2.2

Parameters

string $attributeName:

string $annotationName:

string $context:

string $expected:

mixed $actual:

Return value

AnnotationException

1 call to AnnotationException::attributeTypeError()
DocParser::Annotation in modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
Annotation ::= "@" AnnotationName MethodCall AnnotationName ::= QualifiedName | SimpleName QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName NameSpacePart ::= identifier | null | false |…

File

modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php, line 118

Class

AnnotationException
Description of AnnotationException

Namespace

Doctrine\Common\Annotations

Code

public static function attributeTypeError($attributeName, $annotationName, $context, $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)));
}