Code Duplication    Length = 12-13 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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