Code Duplication    Length = 13-13 lines in 2 locations

src/Entity/EntityDataMapper.php 2 locations

@@ 151-163 (lines=13) @@
148
        }
149
    }
150
151
    public function getPropertyToColumnMapper(): array
152
    {
153
        if (null !== $this->propertyToColumnMapper) {
154
            return $this->propertyToColumnMapper;
155
        }
156
157
        $this->propertyToColumnMapper = [];
158
        foreach ($this->attributes as $attributeName => $attributeMetadata) {
159
            $this->propertyToColumnMapper[$attributeName] = $attributeMetadata['column'] ?? $attributeName;
160
        }
161
162
        return $this->propertyToColumnMapper;
163
    }
164
165
    /**
166
     * @param string $entityFqcn
@@ 252-264 (lines=13) @@
249
        return array_flip($this->getPropertyToColumnMapper());
250
    }
251
252
    private function getPropertyTypeMapper(): array
253
    {
254
        if (null !== $this->propertyTypeMapper) {
255
            return $this->propertyTypeMapper;
256
        }
257
258
        $this->propertyTypeMapper = [];
259
        foreach ($this->attributes as $attributeName => $attributeMetadata) {
260
            $this->propertyTypeMapper[$attributeName] = $attributeMetadata['type'] ?? 'string';
261
        }
262
263
        return $this->propertyTypeMapper;
264
    }
265
266
    private function getPropertyType($propertyName): string
267
    {