Code Duplication    Length = 3-3 lines in 2 locations

src/ArrayHydrator.php 2 locations

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