Code Duplication    Length = 4-4 lines in 2 locations

class/feedcreator.class.php 2 locations

@@ 597-600 (lines=4) @@
594
        }
595
596
        $pos = strrpos($string, '.');
597
        if ($pos >= $length - 4) {
598
            $string = substr($string, 0, $length - 4);
599
            $pos    = strrpos($string, '.');
600
        }
601
        if ($pos >= $length * 0.4) {
602
            return substr($string, 0, $pos + 1) . ' ...';
603
        }
@@ 606-609 (lines=4) @@
603
        }
604
605
        $pos = strrpos($string, ' ');
606
        if ($pos >= $length - 4) {
607
            $string = substr($string, 0, $length - 4);
608
            $pos    = strrpos($string, ' ');
609
        }
610
        if ($pos >= $length * 0.4) {
611
            return substr($string, 0, $pos) . ' ...';
612
        }