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