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
    }
@@ 906-912 (lines=7) @@
903
        $searchResult = $this->repository->getSearchService()->findLocations($searchQuery);
904
905
        $userGroups = array();
906
        foreach ($searchResult->searchHits as $resultItem) {
907
            $userGroups[] = $this->buildDomainUserGroupObject(
908
                $this->repository->getContentService()->internalLoadContent(
909
                    $resultItem->valueObject->contentInfo->id
910
                )
911
            );
912
        }
913
914
        return $userGroups;
915
    }