/** * {@inheritdoc} */ protected function validateAttribute(AttributeMetadata $attribute) { if (true === $this->hasRelationship($attribute->getKey())) { throw MetadataException::fieldKeyInUse('attribute', 'relationship', $attribute->getKey(), $this->name); } if (true === $this->hasEmbed($attribute->getKey())) { throw MetadataException::fieldKeyInUse('attribute', 'embed', $attribute->getKey(), $this->name); } }