diff --git a/src/browse/workflow/ArcanistBrowseWorkflow.php b/src/browse/workflow/ArcanistBrowseWorkflow.php index aa4d86a6..7346ed14 100644 --- a/src/browse/workflow/ArcanistBrowseWorkflow.php +++ b/src/browse/workflow/ArcanistBrowseWorkflow.php @@ -120,9 +120,7 @@ EOTEXT $this->loadHardpoints( $refs, - array( - ArcanistBrowseRef::HARDPOINT_URIS, - )); + ArcanistBrowseRef::HARDPOINT_URIS); $zero_hits = array(); $open_uris = array(); diff --git a/src/workflow/ArcanistDiffWorkflow.php b/src/workflow/ArcanistDiffWorkflow.php index 06e755b1..bd7310ac 100644 --- a/src/workflow/ArcanistDiffWorkflow.php +++ b/src/workflow/ArcanistDiffWorkflow.php @@ -3062,12 +3062,8 @@ EOTEXT ->setCommitRef($base_ref); $this->loadHardpoints( - array( - $state_ref, - ), - array( - ArcanistWorkingCopyStateRef::HARDPOINT_REVISIONREFS, - )); + $state_ref, + ArcanistWorkingCopyStateRef::HARDPOINT_REVISIONREFS); $revision_refs = $state_ref->getRevisionRefs(); $viewer_phid = $this->getUserPHID(); diff --git a/src/workflow/ArcanistFeatureBaseWorkflow.php b/src/workflow/ArcanistFeatureBaseWorkflow.php index fa00c628..94756c2a 100644 --- a/src/workflow/ArcanistFeatureBaseWorkflow.php +++ b/src/workflow/ArcanistFeatureBaseWorkflow.php @@ -79,10 +79,7 @@ EOHELP $this->loadHardpoints( ipull($states, 'state'), - array( - ArcanistWorkingCopyStateRef::HARDPOINT_REVISIONREFS, - )); - + ArcanistWorkingCopyStateRef::HARDPOINT_REVISIONREFS); $this->printBranches($states); diff --git a/src/workflow/ArcanistInspectWorkflow.php b/src/workflow/ArcanistInspectWorkflow.php index 7cd7fd81..6ebb9b22 100644 --- a/src/workflow/ArcanistInspectWorkflow.php +++ b/src/workflow/ArcanistInspectWorkflow.php @@ -98,9 +98,7 @@ EOTEXT if ($hardpoints) { $hardpoint_keys = mpull($hardpoints, 'getHardpointKey'); - $this->loadHardpoints( - $refs, - $hardpoint_keys); + $this->loadHardpoints($refs, $hardpoint_keys); } } } diff --git a/src/workflow/ArcanistWorkflow.php b/src/workflow/ArcanistWorkflow.php index 8e59052a..015b8170 100644 --- a/src/workflow/ArcanistWorkflow.php +++ b/src/workflow/ArcanistWorkflow.php @@ -2299,8 +2299,16 @@ abstract class ArcanistWorkflow extends Phobject { } final protected function loadHardpoints( - array $objects, - array $requests) { + $objects, + $requests) { + + if (!is_array($objects)) { + $objects = array($objects); + } + + if (!is_array($requests)) { + $requests = array($requests); + } $engine = $this->getHardpointEngine();