/** * @param ValueObjectInterface $other * @return boolean */ public function sameValueAs(ValueObjectInterface $other) { if (!$other instanceof WorkflowDescription) { return false; } if (!$this->workflowId()->sameValueAs($other->workflowId())) { return false; } if (count($this->processSteps()) !== count($other->processSteps())) { return false; } $otherProcessSteps = $other->processSteps(); foreach ($this->processSteps() as $index => $processStep) { if (!$processStep->sameValueAs($otherProcessSteps[$index])) { return false; } } return true; }