Code Duplication    Length = 4-4 lines in 2 locations

src/FinderAggregateRepository.php 2 locations

@@ 119-122 (lines=4) @@
116
        }
117
118
        $relatedEntities = [];
119
        foreach ($this->with as $relatedEntityName => $relatedEntityIds) {
120
            $criteria = $this->relatedRepository[$relatedEntityName]->createCriteria(['id.in' => (array)$relatedEntityIds]);
121
            $relatedEntities[$relatedEntityName] = $this->relatedRepository[$relatedEntityName]->findMany($criteria);
122
        }
123
124
        $relatedField = $this->getRelatedField($relatedEntityName);
125
@@ 179-182 (lines=4) @@
176
        }
177
178
        $relatedEntities = [];
179
        foreach ($this->with as $relatedEntityName => $relatedEntityIds) {
180
            $criteria = $this->relatedRepository[$relatedEntityName]->createCriteria(['id.in' => (array)$relatedEntityIds]);
181
            $relatedEntities[$relatedEntityName] = $this->relatedRepository[$relatedEntityName]->findMany($criteria);
182
        }
183
184
        $entitiesArgs = [];
185
        foreach ($rows as &$row) {