To be consistent with Symfony's code conventions, use ``if (false === $task->getTags()->containts($tag))``.