Code Duplication    Length = 3-3 lines in 2 locations

src/Util/EntityUtility.php 2 locations

@@ 201-203 (lines=3) @@
198
                throw MetadataException::invalidMetadata($metadata->type, sprintf('Attribute key mismtach. "%s" !== "%s"', $key, $attribute->key));
199
            }
200
201
            if (false === $this->isFieldKeyValid($attribute->key)) {
202
                throw MetadataException::invalidMetadata($metadata->type, sprintf('The attribute key "%s" is invalid based on the configured name format "%s"', $attribute->key, $this->config->getFieldKeyFormat()));
203
            }
204
205
            if (false === $this->typeFactory->hasType($attribute->dataType)) {
206
                throw MetadataException::invalidMetadata($metadata->type, sprintf('The data type "%s" for attribute "%s" is invalid', $attribute->dataType, $attribute->key));
@@ 255-257 (lines=3) @@
252
            if ($key != $relationship->key) {
253
                throw MetadataException::invalidMetadata($metadata->type, sprintf('Relationship key mismtach. "%s" !== "%s"', $key, $relationship->key));
254
            }
255
            if (false === $this->isFieldKeyValid($relationship->key)) {
256
                throw MetadataException::invalidMetadata($metadata->type, sprintf('The relationship key "%s" is invalid based on the configured name format "%s"', $relationship->key, $this->config->getFieldKeyFormat()));
257
            }
258
            if (true === $metadata->isChildEntity()) {
259
                $parent = $mf->getMetadataForType($metadata->extends);
260
                if ($parent->hasRelationship($relationship->key)) {