Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistInspectWorkflow.php
| Show First 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | public function runWorkflow() { | ||||
| if ($is_explore) { | if ($is_explore) { | ||||
| $this->exploreRefs($all_refs); | $this->exploreRefs($all_refs); | ||||
| } | } | ||||
| $list = array(); | $list = array(); | ||||
| foreach ($all_refs as $ref) { | foreach ($all_refs as $ref) { | ||||
| $out = $this->describeRef($ref, 0); | $out = $this->describeRef($ref, 0); | ||||
| $list[] = implode('', $out); | $list[] = $out; | ||||
| } | } | ||||
| $list = implode("\n", $list); | $list = phutil_glue($list, "\n"); | ||||
| echo tsprintf('%B', $list); | echo tsprintf('%B', $list); | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| private function describeRef(ArcanistRef $ref, $depth) { | private function describeRef(ArcanistRef $ref, $depth) { | ||||
| $indent = str_repeat(' ', $depth); | $indent = str_repeat(' ', $depth); | ||||
| $out = array(); | $out = array(); | ||||
| $out[] = tsprintf( | $out[] = tsprintf( | ||||
| "%s+ [%s] %s\n", | "%s+ [%s] %s\n", | ||||
| $indent, | $indent, | ||||
| get_class($ref), | get_class($ref), | ||||
| $ref->getRefDisplayName()); | $ref->getRefDisplayName()); | ||||
| $hardpoint_list = $ref->getHardpointList(); | $hardpoint_list = $ref->getHardpointList(); | ||||
| foreach ($hardpoint_list->getHardpoints() as $hardpoint) { | foreach ($hardpoint_list->getHardpoints() as $hardpoint) { | ||||
| ▲ Show 20 Lines • Show All 172 Lines • Show Last 20 Lines | |||||