/** * Unset tag used * * @param string $targetId target id * @param TagEntity $tag tag object * @return void */ protected function unused($targetId, TagEntity $tag) { if ($this->repo->existsUsed($targetId, $tag) === true) { $this->repo->deleteUsed($targetId, $tag); $this->repo->decrement($tag); } }