*/ 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 ($annotation::class === $class) { return true; } } return false; } }