Code Duplication    Length = 9-9 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 6885-6893 (lines=9) @@
6882
    static $UTF8_TO_WIN1252_KEYS_CACHE = null;
6883
    static $UTF8_TO_WIN1252_VALUES_CACHE = null;
6884
6885
    if ($UTF8_TO_WIN1252_KEYS_CACHE === null) {
6886
6887
      if (self::$WIN1252_TO_UTF8 === null) {
6888
        self::$WIN1252_TO_UTF8 = self::getData('win1252_to_utf8');
6889
      }
6890
6891
      $UTF8_TO_WIN1252_KEYS_CACHE = \array_keys(self::$WIN1252_TO_UTF8);
6892
      $UTF8_TO_WIN1252_VALUES_CACHE = \array_values(self::$WIN1252_TO_UTF8);
6893
    }
6894
6895
    /** @noinspection PhpInternalEntityUsedInspection */
6896
    $str = \str_replace($UTF8_TO_WIN1252_KEYS_CACHE, $UTF8_TO_WIN1252_VALUES_CACHE, $str);
@@ 6978-6986 (lines=9) @@
6975
    static $WIN1252_TO_UTF8_KEYS_CACHE = null;
6976
    static $WIN1252_TO_UTF8_VALUES_CACHE = null;
6977
6978
    if ($WIN1252_TO_UTF8_KEYS_CACHE === null) {
6979
6980
      if (self::$WIN1252_TO_UTF8 === null) {
6981
        self::$WIN1252_TO_UTF8 = self::getData('win1252_to_utf8');
6982
      }
6983
6984
      $WIN1252_TO_UTF8_KEYS_CACHE = \array_keys(self::$WIN1252_TO_UTF8);
6985
      $WIN1252_TO_UTF8_VALUES_CACHE = \array_values(self::$WIN1252_TO_UTF8);
6986
    }
6987
6988
    return \str_replace($WIN1252_TO_UTF8_KEYS_CACHE, $WIN1252_TO_UTF8_VALUES_CACHE, $str);
6989
  }