Code Duplication    Length = 3-3 lines in 2 locations

src/ArrayHydrator.php 2 locations

@@ 100-102 (lines=3) @@
97
        $metaData = $this->entityManager->getClassMetadata(get_class($entity));
98
        foreach ($metaData->associationMappings as $propertyName => $mapping) {
99
            if (isset($data[$propertyName])) {
100
                if (in_array($mapping['type'], [ClassMetadataInfo::ONE_TO_ONE, ClassMetadataInfo::MANY_TO_ONE])) {
101
                    $entity = $this->hydrateToOneAssociation($entity, $propertyName, $mapping, $data[$propertyName]);
102
                }
103
104
                if (in_array($mapping['type'], [ClassMetadataInfo::ONE_TO_MANY, ClassMetadataInfo::MANY_TO_MANY])) {
105
                    $entity = $this->hydrateToManyAssociation($entity, $propertyName, $mapping, $data[$propertyName]);
@@ 104-106 (lines=3) @@
101
                    $entity = $this->hydrateToOneAssociation($entity, $propertyName, $mapping, $data[$propertyName]);
102
                }
103
104
                if (in_array($mapping['type'], [ClassMetadataInfo::ONE_TO_MANY, ClassMetadataInfo::MANY_TO_MANY])) {
105
                    $entity = $this->hydrateToManyAssociation($entity, $propertyName, $mapping, $data[$propertyName]);
106
                }
107
            }
108
        }
109