/** * @param Service|ServiceGroup $otherObject * @return bool true if objects have same same and values */ public function equals($otherObject) { if (!$otherObject->isGroup()) { return false; } if ($otherObject->name != $this->name) { return false; } return $this->sameValue($otherObject); }