/**
  * @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;
 }
Пример #2
0
 /**
  * @param ValueObjectInterface $other
  * @return boolean
  */
 public function sameValueAs(ValueObjectInterface $other)
 {
     if (!$other instanceof AgentDescription) {
         return false;
     }
     if (count($this->processSteps()) != count($other->processSteps())) {
         return false;
     }
     if ($this->type() !== $other->type()) {
         return false;
     }
     if (!$this->options()->sameValueAs($other->options())) {
         return false;
     }
     foreach ($this->processSteps() as $i => $processStep) {
         if (!$processStep->sameValueAs($other->processSteps()[$i])) {
             return false;
         }
     }
     return true;
 }