It seems like new \Doctrine\Common\Collections\ArrayCollection() of type object<Doctrine\Common\C...ctions\ArrayCollection> is incompatible with the declared type object<Doctrine\Common\C...oductVariantInterface>> of property $productVariants.
Our type inference engine has found an assignment to a property that is incompatible
with the declared type of that property.
Either this assignment is in error or the assigned type should be added
to the documentation/type hint for that property..
Loading history...
29
}
30
31
/**
32
* {@inheritdoc}
33
*/
34
public function hasProductVariants(): bool
35
{
36
return !$this->productVariants->isEmpty();
37
}
38
39
/**
40
* {@inheritdoc}
41
*/
42
public function getProductVariants(): Collection
43
{
44
return $this->productVariants;
45
}
46
47
/**
48
* {@inheritdoc}
49
*/
50
public function hasProductVariant(ProductVariantInterface $productVariant): bool
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..