You are here

public static function AnnotationException::attributeTypeError in Plug 7

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 lib/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php
Annotation ::= "@" AnnotationName MethodCall AnnotationName ::= QualifiedName | SimpleName QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName NameSpacePart ::= identifier | null | false |…

File

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)));
}