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...\Model\TaxonInterface>> of property $taxonomies.
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...
34
}
35
36
public function getTaxons(): Collection
37
{
38
return $this->taxonomies;
39
}
40
41
public function hasTaxon(TaxonInterface $taxon): bool
42
{
43
return $this->taxonomies->contains($taxon);
44
}
45
46
public function addTaxon(TaxonInterface $taxon): void
47
{
48
if (false === $this->hasTaxon($taxon)) {
49
$this->taxonomies->add($taxon);
50
}
51
}
52
53
public function removeTaxon(TaxonInterface $taxon): void
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..