$rgBao->id = $rgid;
$rgBao->contactIds = $cids;
if (!$rgBao->find(TRUE)) {
- CRM_Core_Error::fatal("Dedupe rule not found for selected contacts");
+ throw new CRM_Core_Exception('Dedupe rule not found for selected contacts');
}
$rgBao->fillTable();
*
* @return array
* matching contact ids
+ * @throws \CRM_Core_Exception
*/
public static function dupesByParams(
$params,
$rgBao->contact_type = $ctype;
$rgBao->used = $used;
if (!$rgBao->find(TRUE)) {
- CRM_Core_Error::fatal("$used rule for $ctype does not exist");
+ throw new CRM_Core_Exception("$used rule for $ctype does not exist");
}
}
*
* @return array
* array of (cid1, cid2, weight) dupe triples
+ * @throws \CiviCRM_API3_Exception
*/
public static function dupesInGroup($rgid, $gid, $searchLimit = 0) {
$cids = array_keys(CRM_Contact_BAO_Group::getMember($gid, TRUE, $searchLimit));
*
* @return array
* valid $params array for dedupe
+ * @throws \CRM_Core_Exception
*/
public static function formatParams($fields, $ctype) {
$flat = [];
}
}
}
- if ($table == 'civicrm_phone') {
+ if ($table === 'civicrm_phone') {
$fixes = [
'phone' => 'phone_numeric',
];
* -dstName
* -weight
* -canMerge
- *
- * @throws CRM_Core_Exception
*/
public static function parseAndStoreDupePairs($foundDupes, $cacheKeyString) {
$cids = [];