Code Duplication    Length = 9-9 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 8015-8023 (lines=9) @@
8012
    static $UTF8_TO_WIN1252_KEYS_CACHE = null;
8013
    static $UTF8_TO_WIN1252_VALUES_CACHE = null;
8014
8015
    if ($UTF8_TO_WIN1252_KEYS_CACHE === null) {
8016
8017
      if (self::$WIN1252_TO_UTF8 === null) {
8018
        self::$WIN1252_TO_UTF8 = self::getData('win1252_to_utf8');
8019
      }
8020
8021
      $UTF8_TO_WIN1252_KEYS_CACHE = \array_keys(self::$WIN1252_TO_UTF8);
8022
      $UTF8_TO_WIN1252_VALUES_CACHE = \array_values(self::$WIN1252_TO_UTF8);
8023
    }
8024
8025
    /** @noinspection PhpInternalEntityUsedInspection */
8026
    $str = \str_replace($UTF8_TO_WIN1252_KEYS_CACHE, $UTF8_TO_WIN1252_VALUES_CACHE, $str);
@@ 8108-8116 (lines=9) @@
8105
    static $WIN1252_TO_UTF8_KEYS_CACHE = null;
8106
    static $WIN1252_TO_UTF8_VALUES_CACHE = null;
8107
8108
    if ($WIN1252_TO_UTF8_KEYS_CACHE === null) {
8109
8110
      if (self::$WIN1252_TO_UTF8 === null) {
8111
        self::$WIN1252_TO_UTF8 = self::getData('win1252_to_utf8');
8112
      }
8113
8114
      $WIN1252_TO_UTF8_KEYS_CACHE = \array_keys(self::$WIN1252_TO_UTF8);
8115
      $WIN1252_TO_UTF8_VALUES_CACHE = \array_values(self::$WIN1252_TO_UTF8);
8116
    }
8117
8118
    return \str_replace($WIN1252_TO_UTF8_KEYS_CACHE, $WIN1252_TO_UTF8_VALUES_CACHE, $str);
8119
  }