You are here

function _crm_core_match_engine_weight_cmp in CRM Core 8.3

Same name and namespace in other branches
  1. 8 modules/crm_core_match/crm_core_match.module \_crm_core_match_engine_weight_cmp()
  2. 8.2 modules/crm_core_match/crm_core_match.module \_crm_core_match_engine_weight_cmp()
  3. 7 modules/crm_core_match/crm_core_match.module \_crm_core_match_engine_weight_cmp()

Helper function for engines weight comparison.

File

modules/crm_core_match/crm_core_match.module, line 148
Manages matching engines for identifying duplicate contacts in CRM Core.

Code

function _crm_core_match_engine_weight_cmp($a, $b) {
  if ($a
    ->getWeight() == $b
    ->getWeight()) {
    return 0;
  }
  return $a
    ->getWeight() < $b
    ->getWeight() ? -1 : 1;
}