/** * @param Group $group * * @return Notification */ public function setGroup(Group $group) { if ($this->group !== $group) { $this->group = $group; $this->group->addNotification($this); } return $this; }