Code Duplication    Length = 8-11 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 1052-1062 (lines=11) @@
1049
                ),
1050
                $trimChars
1051
            );
1052
      } else {
1053
        $extract = $replacerForSkippedText . \trim(
1054
                self::substr(
1055
                    $text,
1056
                    $pos_start,
1057
                    $pos_end,
1058
                    $encoding
1059
                ),
1060
                $trimChars
1061
            ) . $replacerForSkippedText;
1062
      }
1063
1064
    } else {
1065
@@ 1078-1085 (lines=8) @@
1075
          self::strpos($text, '.', $l, $encoding)
1076
      );
1077
1078
      if ($pos_end) {
1079
        $extract = \rtrim(
1080
                       self::substr($text, 0, $pos_end, $encoding),
1081
                       $trimChars
1082
                   ) . $replacerForSkippedText;
1083
      } else {
1084
        $extract = $text;
1085
      }
1086
    }
1087
1088
    return $extract;