Code Duplication    Length = 12-13 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

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