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)) {
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
63
{
64
list(
65
$this->name,
66
$this->methodMetadata,
67
$this->propertyMetadata,
68
$this->fileResources,
69
$this->createdAt,
70
$this->annotations,
71
$this->id,
72
$this->associations
73
) = unserialize($str);
74
75
$this->reflection = new \ReflectionClass($this->name);