Code Duplication    Length = 12-13 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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