/** * {@inheritdoc} */ protected function validateEmbed(EmbeddedPropMetadata $embed) { if (true === $this->hasAttribute($embed->getKey())) { throw MetadataException::fieldKeyInUse('embed', 'attribute', $embed->getKey(), $this->name); } }
/** * {@inheritdoc} */ protected function validateRelationship(RelationshipMetadata $relationship) { if (true === $this->hasAttribute($relationship->getKey())) { throw MetadataException::fieldKeyInUse('relationship', 'attribute', $relationship->getKey(), $this->name); } if (true === $this->hasEmbed($relationship->getKey())) { throw MetadataException::fieldKeyInUse('relationship', 'embed', $relationship->getKey(), $this->name); } }