/** * Create a new tag * * @param string $instanceId instance id * @param string $word tag word * @return TagEntity */ protected function create($instanceId, $word) { $tag = new TagEntity(); $tag->instanceId = $instanceId; $tag->word = $word; $tag->decomposed = $this->decomposer->execute($word); return $this->repo->insert($tag); }