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...tity\SectionInterface>> of property $sections.
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...
31
}
32
33
/**
34
* @return Collection|SectionInterface[]
35
*/
36
public function getSections(): ?Collection
37
{
38
return $this->sections;
39
}
40
41
/**
42
* @param SectionInterface $section
43
*
44
* @return bool
45
*/
46
public function hasSection(SectionInterface $section): bool
47
{
48
return $this->sections->contains($section);
49
}
50
51
/**
52
* @param SectionInterface $section
53
*/
54
public function addSection(SectionInterface $section): void
55
{
56
$this->sections->add($section);
57
}
58
59
/**
60
* @param SectionInterface $section
61
*/
62
public function removeSection(SectionInterface $section): 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..