Code Duplication    Length = 11-12 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 2182-2193 (lines=12) @@
2179
    ) {
2180
      self::checkForSupport();
2181
2182
      if (
2183
          $encoding === 'UTF-8'
2184
          &&
2185
          (
2186
              $force === true
2187
              || $encodingDetected === 'UTF-8'
2188
              || $encodingDetected === 'WINDOWS-1252'
2189
              || $encodingDetected === 'ISO-8859-1'
2190
          )
2191
      ) {
2192
        return self::to_utf8($str);
2193
      }
2194
2195
      if (
2196
          $encoding === 'ISO-8859-1'
@@ 2195-2205 (lines=11) @@
2192
        return self::to_utf8($str);
2193
      }
2194
2195
      if (
2196
          $encoding === 'ISO-8859-1'
2197
          &&
2198
          (
2199
              $force === true
2200
              || $encodingDetected === 'ISO-8859-1'
2201
              || $encodingDetected === 'UTF-8'
2202
          )
2203
      ) {
2204
        return self::to_win1252($str);
2205
      }
2206
2207
      $strEncoded = \mb_convert_encoding(
2208
          $str,