Code Duplication    Length = 11-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
      ) {
1378
        return self::to_utf8($str);
1379
      }
1380
1381
      if (
1382
          $encoding === 'ISO-8859-1'
@@ 1381-1391 (lines=11) @@
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 === 'UTF-8'
1388
          )
1389
      ) {
1390
        return self::to_iso8859($str);
1391
      }
1392
1393
      if (
1394
          $encoding !== 'UTF-8'