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'];
@@ 350-353 (lines=4) @@
347
            $path = $this->getFilePath('model', $mapping['entity']);
348
            $relatedEntityMapping = $this->getMapping('model', $mapping['entity'], $path);
349
350
            if (isset($relatedEntityMapping['entity']['polymorphic'])) {
351
                $relationship->setPolymorphic(true);
352
                $relationship->ownedTypes = $this->getOwnedTypes($mapping['entity']);
353
            }
354
355
            if (isset($mapping['search']['store'])) {
356
                $relationship->setSearchProperty(true);