Creates a new AnnotationException describing an required error of an attribute.
@since 2.2
string $attributeName:
string $annotationName:
string $context:
string $expected:
public static function requiredError($attributeName, $annotationName, $context, $expected) {
return new self(sprintf('[Type Error] Attribute "%s" of @%s declared on %s expects %s. This value should not be null.', $attributeName, $annotationName, $context, $expected));
}