Code Duplication    Length = 11-12 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 1215-1226 (lines=12) @@
1212
        )
1213
    ) {
1214
1215
      if (
1216
          $encoding === 'UTF-8'
1217
          &&
1218
          (
1219
              $force === true
1220
              || $encodingDetected === 'UTF-8'
1221
              || $encodingDetected === 'WINDOWS-1252'
1222
              || $encodingDetected === 'ISO-8859-1'
1223
          )
1224
      ) {
1225
        return self::to_utf8($str);
1226
      }
1227
1228
      if (
1229
          $encoding === 'ISO-8859-1'
@@ 1228-1238 (lines=11) @@
1225
        return self::to_utf8($str);
1226
      }
1227
1228
      if (
1229
          $encoding === 'ISO-8859-1'
1230
          &&
1231
          (
1232
              $force === true
1233
              || $encodingDetected === 'ISO-8859-1'
1234
              || $encodingDetected === 'UTF-8'
1235
          )
1236
      ) {
1237
        return self::to_win1252($str);
1238
      }
1239
1240
      $strEncoded = \mb_convert_encoding(
1241
          $str,