Code Duplication    Length = 12-13 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 1363-1375 (lines=13) @@
1360
        )
1361
    ) {
1362
1363
      if (
1364
          $encoding === 'UTF-8'
1365
          &&
1366
          (
1367
              $force === true
1368
              || $encodingDetected === 'UTF-8'
1369
              || $encodingDetected === 'WINDOWS-1252'
1370
              || $encodingDetected === 'ISO-8859-1'
1371
          )
1372
      ) {
1373
        return self::to_utf8($str);
1374
      }
1375
1376
      if (
1377
          $encoding === 'ISO-8859-1'
1378
          &&
@@ 1376-1387 (lines=12) @@
1373
        return self::to_utf8($str);
1374
      }
1375
1376
      if (
1377
          $encoding === 'ISO-8859-1'
1378
          &&
1379
          (
1380
              $force === true
1381
              || $encodingDetected === 'ISO-8859-1'
1382
              || $encodingDetected === 'WINDOWS-1252'
1383
              || $encodingDetected === 'UTF-8'
1384
          )
1385
      ) {
1386
        return self::to_iso8859($str);
1387
      }
1388
1389
      if (
1390
          $encoding !== 'UTF-8'