*/ final class AnnotationCollection extends ArrayObject { /** * Checks if the collection has annotations for a class */ public function hasAnnotation(string $class): bool { foreach ($this as $annotation) { if (get_class($annotation) === $class) { return true; } } return false; } }