Creates a new AnnotationException describing an type error of an attribute.
@since 2.2
string $attributeName:
string $annotationName:
string $context:
string $expected:
mixed $actual:
public static function typeError($attributeName, $annotationName, $context, $expected, $actual) {
return new self(sprintf('[Type Error] 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)));
}