Code Duplication    Length = 12-12 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 909-920 (lines=12) @@
906
        )
907
    ) {
908
909
      if (
910
          $encoding === 'UTF-8'
911
          &&
912
          (
913
              $force === true
914
              || $encodingDetected === 'UTF-8'
915
              || $encodingDetected === 'WINDOWS-1252'
916
              || $encodingDetected === 'ISO-8859-1'
917
          )
918
      ) {
919
        return self::to_utf8($str);
920
      }
921
922
      if (
923
          $encoding === 'ISO-8859-1'
@@ 922-933 (lines=12) @@
919
        return self::to_utf8($str);
920
      }
921
922
      if (
923
          $encoding === 'ISO-8859-1'
924
          &&
925
          (
926
              $force === true
927
              || $encodingDetected === 'ISO-8859-1'
928
              || $encodingDetected === 'WINDOWS-1252'
929
              || $encodingDetected === 'UTF-8'
930
          )
931
      ) {
932
        return self::to_iso8859($str);
933
      }
934
935
      if (
936
          $encoding !== 'UTF-8'