/**
  * {@inheritdoc}
  */
 public function merge(AttributeMetadataInterface $attributeMetadata)
 {
     foreach ($attributeMetadata->getGroups() as $group) {
         $this->addGroup($group);
     }
     // Overwrite only if not defined
     if (null === $this->maxDepth) {
         $this->maxDepth = $attributeMetadata->getMaxDepth();
     }
 }
 /**
  * {@inheritdoc}
  */
 public function addAttributeMetadata(AttributeMetadataInterface $attributeMetadata)
 {
     $this->attributesMetadata[$attributeMetadata->getName()] = $attributeMetadata;
 }
 /**
  * {@inheritdoc}
  */
 public function merge(AttributeMetadataInterface $attributeMetadata)
 {
     foreach ($attributeMetadata->getGroups() as $group) {
         $this->addGroup($group);
     }
 }