Code Duplication    Length = 12-13 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 787-799 (lines=13) @@
784
        )
785
    ) {
786
787
      if (
788
          $encoding === 'UTF-8'
789
          &&
790
          (
791
              $force === true
792
              || $encodingDetected === 'UTF-8'
793
              || $encodingDetected === 'WINDOWS-1252'
794
              || $encodingDetected === 'ISO-8859-1'
795
          )
796
      ) {
797
        return self::to_utf8($str);
798
      }
799
800
      if (
801
          $encoding === 'ISO-8859-1'
802
          &&
@@ 800-811 (lines=12) @@
797
        return self::to_utf8($str);
798
      }
799
800
      if (
801
          $encoding === 'ISO-8859-1'
802
          &&
803
          (
804
              $force === true
805
              || $encodingDetected === 'ISO-8859-1'
806
              || $encodingDetected === 'WINDOWS-1252'
807
              || $encodingDetected === 'UTF-8'
808
          )
809
      ) {
810
        return self::to_iso8859($str);
811
      }
812
813
      if (
814
          $encoding !== 'UTF-8'