public function addTopicToArticle(Topic $topic, Article $article) { $result = $this->attachTopicToArticle($topic, $article); if (!$result) { throw new ResourcesConflictException('Topic already attached to article', 409); } return true; }