Code Duplication    Length = 8-8 lines in 2 locations

class/item.php 2 locations

@@ 169-176 (lines=8) @@
166
        if (!empty($stripTags)) {
167
            $ret = strip_tags($ret, $stripTags);
168
        }
169
        if (0 != $maxLength) {
170
            if (!XOOPS_USE_MULTIBYTES) {
171
                if (strlen($ret) >= $maxLength) {
172
                    //$ret = PublisherUtility::substr($ret , 0, $maxLength);
173
                    $ret = PublisherUtility::truncateTagSafe($ret, $maxLength, $etc = '...', $breakWords = false);
174
                }
175
            }
176
        }
177
178
        return $ret;
179
    }
@@ 271-278 (lines=8) @@
268
        if (!empty($stripTags)) {
269
            $ret = strip_tags($ret, $stripTags);
270
        }
271
        if (0 != $maxLength) {
272
            if (!XOOPS_USE_MULTIBYTES) {
273
                if (strlen($ret) >= $maxLength) {
274
                    //$ret = PublisherUtility::substr($ret , 0, $maxLength);
275
                    $ret = PublisherUtility::truncateTagSafe($ret, $maxLength, $etc = '...', $breakWords = false);
276
                }
277
            }
278
        }
279
280
        return $ret;
281
    }