Code Duplication    Length = 7-7 lines in 2 locations

eZ/Publish/Core/Repository/UserService.php 2 locations

@@ 187-193 (lines=7) @@
184
        }
185
186
        $subUserGroups = array();
187
        foreach ($searchResult->searchHits as $searchHit) {
188
            $subUserGroups[] = $this->buildDomainUserGroupObject(
189
                $this->repository->getContentService()->internalLoadContent(
190
                    $searchHit->valueObject->contentInfo->id
191
                )
192
            );
193
        }
194
195
        return $subUserGroups;
196
    }
@@ 904-910 (lines=7) @@
901
        $searchResult = $this->repository->getSearchService()->findLocations($searchQuery);
902
903
        $userGroups = array();
904
        foreach ($searchResult->searchHits as $resultItem) {
905
            $userGroups[] = $this->buildDomainUserGroupObject(
906
                $this->repository->getContentService()->internalLoadContent(
907
                    $resultItem->valueObject->contentInfo->id
908
                )
909
            );
910
        }
911
912
        return $userGroups;
913
    }