Changeset View
Changeset View
Standalone View
Standalone View
src/browse/loader/ArcanistBrowseCommitURIHardpointLoader.php
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | public function loadHardpoints(array $refs, $hardpoint) { | ||||
} | } | ||||
$repository_ref = $query->getRepositoryRef(); | $repository_ref = $query->getRepositoryRef(); | ||||
if (!$repository_ref) { | if (!$repository_ref) { | ||||
return array(); | return array(); | ||||
} | } | ||||
$refs = $this->getRefsWithSupportedTypes($refs); | $refs = $this->getRefsWithSupportedTypes($refs); | ||||
if (!$refs) { | if (!$refs) { | ||||
return array(); | return array(); | ||||
} | } | ||||
$this->newQuery($refs) | $this->newQuery($refs) | ||||
->needHardpoints( | ->needHardpoints( | ||||
array( | array( | ||||
'commitRefs', | 'commitRefs', | ||||
Show All 16 Lines | public function loadHardpoints(array $refs, $hardpoint) { | ||||
$results = array(); | $results = array(); | ||||
foreach ($refs as $key => $ref) { | foreach ($refs as $key => $ref) { | ||||
$commit_refs = $ref->getCommitRefs(); | $commit_refs = $ref->getCommitRefs(); | ||||
foreach ($commit_refs as $commit_ref) { | foreach ($commit_refs as $commit_ref) { | ||||
$uri = $commit_ref->getURI(); | $uri = $commit_ref->getURI(); | ||||
if ($uri !== null) { | if ($uri !== null) { | ||||
$results[$key][] = id(new ArcanistBrowseURIRef()) | $results[$key][] = id(new ArcanistBrowseURIRef()) | ||||
->setURI() | ->setURI($uri) | ||||
->setType(self::BROWSETYPE); | ->setType(self::BROWSETYPE); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
return $results; | return $results; | ||||
} | } | ||||
} | } |