The method hasAnnotation() does not exist on Metadata\PropertyMetadata. Are you sure you never get this type here, but always one of the subclasses?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
32
if ($metadata->/** @scrutinizer ignore-call */ hasAnnotation(\Vox\Webservice\Mapping\BelongsTo::class)) {