Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14895078
D21088.id50241.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D21088.id50241.diff
View Options
diff --git a/src/browse/workflow/ArcanistBrowseWorkflow.php b/src/browse/workflow/ArcanistBrowseWorkflow.php
--- a/src/browse/workflow/ArcanistBrowseWorkflow.php
+++ b/src/browse/workflow/ArcanistBrowseWorkflow.php
@@ -120,9 +120,7 @@
$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
--- a/src/workflow/ArcanistDiffWorkflow.php
+++ b/src/workflow/ArcanistDiffWorkflow.php
@@ -3062,12 +3062,8 @@
->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
--- a/src/workflow/ArcanistFeatureBaseWorkflow.php
+++ b/src/workflow/ArcanistFeatureBaseWorkflow.php
@@ -79,10 +79,7 @@
$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
--- a/src/workflow/ArcanistInspectWorkflow.php
+++ b/src/workflow/ArcanistInspectWorkflow.php
@@ -98,9 +98,7 @@
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
--- a/src/workflow/ArcanistWorkflow.php
+++ b/src/workflow/ArcanistWorkflow.php
@@ -2299,8 +2299,16 @@
}
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();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 10, 8:54 AM (3 h, 34 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7116350
Default Alt Text
D21088.id50241.diff (2 KB)
Attached To
Mode
D21088: Allow "loadHardpoints()" to accept a single ref and/or a single hardpoint
Attached
Detach File
Event Timeline
Log In to Comment