diff --git a/src/Server/Tool.php b/src/Server/Tool.php index 094f0f2..593cff7 100644 --- a/src/Server/Tool.php +++ b/src/Server/Tool.php @@ -29,6 +29,7 @@ public function annotations(): array // @phpstan-ignore-next-line return collect($reflection->getAttributes()) ->map(fn (ReflectionAttribute $attributeReflection): object => $attributeReflection->newInstance()) + ->filter(fn (object $attribute): bool => $attribute instanceof Annotation) // @phpstan-ignore-next-line ->mapWithKeys(fn (Annotation $attribute): array => [$attribute->key() => $attribute->value]) ->all();