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...odel\ChannelInterface>> of property $channels.
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...
27
}
28
29
public function getChannels(): Collection
30
{
31
return $this->channels;
32
}
33
34
public function addChannel(ChannelInterface $channel): void
35
{
36
if (!$this->hasChannel($channel)) {
37
$this->channels->add($channel);
38
}
39
}
40
41
public function removeChannel(ChannelInterface $channel): void
42
{
43
if ($this->hasChannel($channel)) {
44
$this->channels->removeElement($channel);
45
}
46
}
47
48
public function hasChannel(ChannelInterface $channel): 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..