Code Duplication    Length = 12-13 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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