Code Duplication    Length = 9-9 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 6958-6966 (lines=9) @@
6955
    static $UTF8_TO_WIN1252_KEYS_CACHE = null;
6956
    static $UTF8_TO_WIN1252_VALUES_CACHE = null;
6957
6958
    if ($UTF8_TO_WIN1252_KEYS_CACHE === null) {
6959
6960
      if (self::$WIN1252_TO_UTF8 === null) {
6961
        self::$WIN1252_TO_UTF8 = self::getData('win1252_to_utf8');
6962
      }
6963
6964
      $UTF8_TO_WIN1252_KEYS_CACHE = \array_keys(self::$WIN1252_TO_UTF8);
6965
      $UTF8_TO_WIN1252_VALUES_CACHE = \array_values(self::$WIN1252_TO_UTF8);
6966
    }
6967
6968
    /** @noinspection PhpInternalEntityUsedInspection */
6969
    $str = \str_replace($UTF8_TO_WIN1252_KEYS_CACHE, $UTF8_TO_WIN1252_VALUES_CACHE, $str);
@@ 7051-7059 (lines=9) @@
7048
    static $WIN1252_TO_UTF8_KEYS_CACHE = null;
7049
    static $WIN1252_TO_UTF8_VALUES_CACHE = null;
7050
7051
    if ($WIN1252_TO_UTF8_KEYS_CACHE === null) {
7052
7053
      if (self::$WIN1252_TO_UTF8 === null) {
7054
        self::$WIN1252_TO_UTF8 = self::getData('win1252_to_utf8');
7055
      }
7056
7057
      $WIN1252_TO_UTF8_KEYS_CACHE = \array_keys(self::$WIN1252_TO_UTF8);
7058
      $WIN1252_TO_UTF8_VALUES_CACHE = \array_values(self::$WIN1252_TO_UTF8);
7059
    }
7060
7061
    return \str_replace($WIN1252_TO_UTF8_KEYS_CACHE, $WIN1252_TO_UTF8_VALUES_CACHE, $str);
7062
  }