/** * @param ValueObjectInterface $other * @return boolean */ public function sameValueAs(ValueObjectInterface $other) { if (!$other instanceof StructureDefinition) { return false; } if (count($this->structureItems()) !== count($other->structureItems())) { return false; } foreach ($this->structureItems() as $i => $structureItem) { if (!$structureItem->sameValueAs($other->structureItems()[$i])) { return false; } } return true; }