Code Duplication    Length = 12-13 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 734-746 (lines=13) @@
731
        )
732
    ) {
733
734
      if (
735
          $encoding === 'UTF-8'
736
          &&
737
          (
738
              $force === true
739
              || $encodingDetected === 'UTF-8'
740
              || $encodingDetected === 'WINDOWS-1252'
741
              || $encodingDetected === 'ISO-8859-1'
742
          )
743
      ) {
744
        return self::to_utf8($str);
745
      }
746
747
      if (
748
          $encoding === 'ISO-8859-1'
749
          &&
@@ 747-758 (lines=12) @@
744
        return self::to_utf8($str);
745
      }
746
747
      if (
748
          $encoding === 'ISO-8859-1'
749
          &&
750
          (
751
              $force === true
752
              || $encodingDetected === 'ISO-8859-1'
753
              || $encodingDetected === 'WINDOWS-1252'
754
              || $encodingDetected === 'UTF-8'
755
          )
756
      ) {
757
        return self::to_iso8859($str);
758
      }
759
760
      if (
761
          $encoding !== 'UTF-8'