Code Duplication    Length = 8-11 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 1059-1069 (lines=11) @@
1056
                ),
1057
                $trimChars
1058
            );
1059
      } else {
1060
        $extract = $replacerForSkippedText . \trim(
1061
                self::substr(
1062
                    $text,
1063
                    $pos_start,
1064
                    $pos_end,
1065
                    $encoding
1066
                ),
1067
                $trimChars
1068
            ) . $replacerForSkippedText;
1069
      }
1070
1071
    } else {
1072
@@ 1085-1092 (lines=8) @@
1082
          self::strpos($text, '.', $l, $encoding)
1083
      );
1084
1085
      if ($pos_end) {
1086
        $extract = \rtrim(
1087
                       self::substr($text, 0, $pos_end, $encoding),
1088
                       $trimChars
1089
                   ) . $replacerForSkippedText;
1090
      } else {
1091
        $extract = $text;
1092
      }
1093
    }
1094
1095
    return $extract;