public function equals(phpBrainz_Artist $compareObj) { if ($this->id == $compareObj->getId() || $this->name == $compareObj->getName() && $this->sortName == $compareObj->getSortName() && $this->beginDate == $compareObj->getBeginDate() && $this->endDate == $compareObj->getEndDate()) { return true; } return false; }