public static function validateTags(array &$array, $direction = null)
    {
        foreach ($array as $key => $tag) {
            $array[$key] = self::validateTag($tag, $direction);
        }

        return $array;
    }