Пример #1
0
 /**
  * @param ValueObjectInterface $other
  * @return boolean
  */
 public function sameValueAs(ValueObjectInterface $other)
 {
     if (!$other instanceof RoleDescription) {
         return false;
     }
     return EqualsBuilder::create()->append($this->name()->sameValueAs($other->name()), true)->append($this->options()->sameValueAs($other->options()), true)->strict()->equals();
 }
Пример #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;
 }