public static function removeTags($tags, $tagType)
    {
        if (empty($tags)) {
            return;
        }

        foreach ($tags as $name) {
            $tag = self::find()
                ->where(['name' => $name])
                ->andWhere(['tag_type' => $tagType])
                ->one();
            if (!is_null($tag)) {
                $tag->updateCounters(['frequency' => '-' . self::DEFAULT_FREQUENCY]);

                if ($tag->frequency <= 0) {
                    $tag->delete();
                }
            }
        }
    }