Code Duplication    Length = 4-4 lines in 2 locations

src/Metadata/Driver/YamlFileDriver.php 2 locations

@@ 41-44 (lines=4) @@
38
            $metadata->setAbstract(true);
39
        }
40
41
        if (isset($mapping['entity']['polymorphic'])) {
42
            $metadata->setPolymorphic(true);
43
            $metadata->ownedTypes = $this->getOwnedTypes($metadata->type);
44
        }
45
46
        if (isset($mapping['entity']['extends'])) {
47
            $metadata->extends = $mapping['entity']['extends'];
@@ 344-347 (lines=4) @@
341
            $path = $this->getFilePath('model', $mapping['entity']);
342
            $relatedEntityMapping = $this->getMapping('model', $mapping['entity'], $path);
343
344
            if (isset($relatedEntityMapping['entity']['polymorphic'])) {
345
                $relationship->setPolymorphic(true);
346
                $relationship->ownedTypes = $this->getOwnedTypes($mapping['entity']);
347
            }
348
349
            if (isset($mapping['search']['store'])) {
350
                $relationship->setSearchProperty(true);