public static function register($entityTypeID, $entityID, $type, array $values, $isRaw = true)
 {
     if (!is_int($entityTypeID)) {
         throw new Main\ArgumentTypeException('entityTypeID', 'integer');
     }
     if (!is_int($entityID)) {
         throw new Main\ArgumentTypeException('entityID', 'integer');
     }
     if (!is_string($type)) {
         throw new Main\ArgumentTypeException('type', 'string');
     }
     if ($isRaw) {
         $values = self::prepareCodes($type, $values);
     }
     DuplicateCommunicationMatchCodeTable::replaceValues($entityTypeID, $entityID, $type, $values);
     $typeID = DuplicateIndexType::UNDEFINED;
     if ($type === 'PHONE') {
         $typeID = DuplicateIndexType::COMMUNICATION_PHONE;
     } elseif ($type === 'EMAIL') {
         $typeID = DuplicateIndexType::COMMUNICATION_EMAIL;
     }
     if ($typeID !== DuplicateIndexType::UNDEFINED) {
         DuplicateEntityMatchHash::unregisterEntity($entityTypeID, $entityID, $typeID);
         foreach ($values as $value) {
             $matches = array('TYPE' => $type, 'VALUE' => $value);
             DuplicateEntityMatchHash::register($entityTypeID, $entityID, $typeID, self::prepareMatchHash($matches), true);
         }
     }
 }