Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 196-202 (lines=7) @@
193
        }
194
195
        $subUserGroups = array();
196
        foreach ($searchResult->searchHits as $searchHit) {
197
            $subUserGroups[] = $this->buildDomainUserGroupObject(
198
                $this->repository->getContentService()->internalLoadContent(
199
                    $searchHit->valueObject->contentInfo->id
200
                )
201
            );
202
        }
203
204
        return $subUserGroups;
205
    }
@@ 916-922 (lines=7) @@
913
        $searchResult = $this->repository->getSearchService()->findLocations($searchQuery);
914
915
        $userGroups = array();
916
        foreach ($searchResult->searchHits as $resultItem) {
917
            $userGroups[] = $this->buildDomainUserGroupObject(
918
                $this->repository->getContentService()->internalLoadContent(
919
                    $resultItem->valueObject->contentInfo->id
920
                )
921
            );
922
        }
923
924
        return $userGroups;
925
    }