Code Duplication    Length = 9-9 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 6881-6889 (lines=9) @@
6878
    static $UTF8_TO_WIN1252_KEYS_CACHE = null;
6879
    static $UTF8_TO_WIN1252_VALUES_CACHE = null;
6880
6881
    if ($UTF8_TO_WIN1252_KEYS_CACHE === null) {
6882
6883
      if (self::$WIN1252_TO_UTF8 === null) {
6884
        self::$WIN1252_TO_UTF8 = self::getData('win1252_to_utf8');
6885
      }
6886
6887
      $UTF8_TO_WIN1252_KEYS_CACHE = \array_keys(self::$WIN1252_TO_UTF8);
6888
      $UTF8_TO_WIN1252_VALUES_CACHE = \array_values(self::$WIN1252_TO_UTF8);
6889
    }
6890
6891
    /** @noinspection PhpInternalEntityUsedInspection */
6892
    $str = \str_replace($UTF8_TO_WIN1252_KEYS_CACHE, $UTF8_TO_WIN1252_VALUES_CACHE, $str);
@@ 6974-6982 (lines=9) @@
6971
    static $WIN1252_TO_UTF8_KEYS_CACHE = null;
6972
    static $WIN1252_TO_UTF8_VALUES_CACHE = null;
6973
6974
    if ($WIN1252_TO_UTF8_KEYS_CACHE === null) {
6975
6976
      if (self::$WIN1252_TO_UTF8 === null) {
6977
        self::$WIN1252_TO_UTF8 = self::getData('win1252_to_utf8');
6978
      }
6979
6980
      $WIN1252_TO_UTF8_KEYS_CACHE = \array_keys(self::$WIN1252_TO_UTF8);
6981
      $WIN1252_TO_UTF8_VALUES_CACHE = \array_values(self::$WIN1252_TO_UTF8);
6982
    }
6983
6984
    return \str_replace($WIN1252_TO_UTF8_KEYS_CACHE, $WIN1252_TO_UTF8_VALUES_CACHE, $str);
6985
  }