Code Duplication    Length = 12-13 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 796-808 (lines=13) @@
793
        $encodingDetected !== $encoding
794
    ) {
795
796
      if (
797
          $encoding === 'UTF-8'
798
          &&
799
          (
800
              $force === true
801
              || $encodingDetected === 'UTF-8'
802
              || $encodingDetected === 'WINDOWS-1252'
803
              || $encodingDetected === 'ISO-8859-1'
804
          )
805
      ) {
806
        return self::to_utf8($str);
807
      }
808
809
      if (
810
          $encoding === 'ISO-8859-1'
811
          &&
@@ 809-820 (lines=12) @@
806
        return self::to_utf8($str);
807
      }
808
809
      if (
810
          $encoding === 'ISO-8859-1'
811
          &&
812
          (
813
              $force === true
814
              || $encodingDetected === 'ISO-8859-1'
815
              || $encodingDetected === 'WINDOWS-1252'
816
              || $encodingDetected === 'UTF-8'
817
          )
818
      ) {
819
        return self::to_iso8859($str);
820
      }
821
822
      if (
823
          $encoding !== 'UTF-8'