public static function compare(Merchant $a, Merchant $b) { if ($a->getApiKey() != $b->getApiKey()) { return false; } if ($a->getEndpoint() != $b->getEndpoint()) { return false; } return true; }