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
    }
@@ 913-919 (lines=7) @@
910
        $searchResult = $this->repository->getSearchService()->findLocations($searchQuery);
911
912
        $userGroups = array();
913
        foreach ($searchResult->searchHits as $resultItem) {
914
            $userGroups[] = $this->buildDomainUserGroupObject(
915
                $this->repository->getContentService()->internalLoadContent(
916
                    $resultItem->valueObject->contentInfo->id
917
                )
918
            );
919
        }
920
921
        return $userGroups;
922
    }