public function addTask(TaskInterface $task) { if ($this->tasks->contains($task)) { return; } $this->tasks->add($task); }