Page MenuHomePhorge

D26040.1750111455.diff
No OneTemporary

D26040.1750111455.diff

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
@@ -58,7 +58,7 @@
);
}
- public function runWorkflow() {
+ protected function runWorkflow() {
$targets = $this->getArgument('targets');
$targets = array_fuse($targets);
diff --git a/src/toolset/workflow/ArcanistAliasWorkflow.php b/src/toolset/workflow/ArcanistAliasWorkflow.php
--- a/src/toolset/workflow/ArcanistAliasWorkflow.php
+++ b/src/toolset/workflow/ArcanistAliasWorkflow.php
@@ -91,7 +91,7 @@
);
}
- public function runWorkflow() {
+ protected function runWorkflow() {
$argv = $this->getArgument('argv');
$is_list = false;
diff --git a/src/toolset/workflow/ArcanistPromptsWorkflow.php b/src/toolset/workflow/ArcanistPromptsWorkflow.php
--- a/src/toolset/workflow/ArcanistPromptsWorkflow.php
+++ b/src/toolset/workflow/ArcanistPromptsWorkflow.php
@@ -56,7 +56,7 @@
);
}
- public function runWorkflow() {
+ protected function runWorkflow() {
$argv = $this->getArgument('argv');
if (!$argv) {
diff --git a/src/toolset/workflow/ArcanistShellCompleteWorkflow.php b/src/toolset/workflow/ArcanistShellCompleteWorkflow.php
--- a/src/toolset/workflow/ArcanistShellCompleteWorkflow.php
+++ b/src/toolset/workflow/ArcanistShellCompleteWorkflow.php
@@ -86,7 +86,7 @@
);
}
- public function runWorkflow() {
+ protected function runWorkflow() {
$log = $this->getLogEngine();
$argv = $this->getArgument('argv');
diff --git a/src/toolset/workflow/ArcanistVersionWorkflow.php b/src/toolset/workflow/ArcanistVersionWorkflow.php
--- a/src/toolset/workflow/ArcanistVersionWorkflow.php
+++ b/src/toolset/workflow/ArcanistVersionWorkflow.php
@@ -31,7 +31,7 @@
return array();
}
- public function runWorkflow() {
+ protected function runWorkflow() {
// TOOLSETS: Show the toolset version, not just the "arc" version.
$console = PhutilConsole::getConsole();
diff --git a/src/workflow/ArcanistAmendWorkflow.php b/src/workflow/ArcanistAmendWorkflow.php
--- a/src/workflow/ArcanistAmendWorkflow.php
+++ b/src/workflow/ArcanistAmendWorkflow.php
@@ -60,7 +60,7 @@
);
}
- public function runWorkflow() {
+ protected function runWorkflow() {
$symbols = $this->getSymbolEngine();
$is_show = $this->getArgument('show');
diff --git a/src/workflow/ArcanistAnoidWorkflow.php b/src/workflow/ArcanistAnoidWorkflow.php
--- a/src/workflow/ArcanistAnoidWorkflow.php
+++ b/src/workflow/ArcanistAnoidWorkflow.php
@@ -23,7 +23,7 @@
return array();
}
- public function runWorkflow() {
+ protected function runWorkflow() {
if (!Filesystem::binaryExists('python3')) {
throw new PhutilArgumentUsageException(
pht(
diff --git a/src/workflow/ArcanistCallConduitWorkflow.php b/src/workflow/ArcanistCallConduitWorkflow.php
--- a/src/workflow/ArcanistCallConduitWorkflow.php
+++ b/src/workflow/ArcanistCallConduitWorkflow.php
@@ -35,7 +35,7 @@
);
}
- public function runWorkflow() {
+ protected function runWorkflow() {
$method = $this->getArgument('method');
if (count($method) !== 1) {
throw new PhutilArgumentUsageException(
diff --git a/src/workflow/ArcanistDownloadWorkflow.php b/src/workflow/ArcanistDownloadWorkflow.php
--- a/src/workflow/ArcanistDownloadWorkflow.php
+++ b/src/workflow/ArcanistDownloadWorkflow.php
@@ -55,7 +55,7 @@
}
- public function runWorkflow() {
+ protected function runWorkflow() {
$file_symbols = $this->getArgument('argv');
if (!$file_symbols) {
diff --git a/src/workflow/ArcanistInspectWorkflow.php b/src/workflow/ArcanistInspectWorkflow.php
--- a/src/workflow/ArcanistInspectWorkflow.php
+++ b/src/workflow/ArcanistInspectWorkflow.php
@@ -28,7 +28,7 @@
);
}
- public function runWorkflow() {
+ protected function runWorkflow() {
$is_explore = $this->getArgument('explore');
$objects = $this->getArgument('objects');
diff --git a/src/workflow/ArcanistLandWorkflow.php b/src/workflow/ArcanistLandWorkflow.php
--- a/src/workflow/ArcanistLandWorkflow.php
+++ b/src/workflow/ArcanistLandWorkflow.php
@@ -292,7 +292,7 @@
return 50;
}
- public function runWorkflow() {
+ protected function runWorkflow() {
$working_copy = $this->getWorkingCopy();
$repository_api = $working_copy->getRepositoryAPI();
diff --git a/src/workflow/ArcanistLiberateWorkflow.php b/src/workflow/ArcanistLiberateWorkflow.php
--- a/src/workflow/ArcanistLiberateWorkflow.php
+++ b/src/workflow/ArcanistLiberateWorkflow.php
@@ -44,7 +44,7 @@
}
- public function runWorkflow() {
+ protected function runWorkflow() {
$log = $this->getLogEngine();
$argv = $this->getArgument('argv');
diff --git a/src/workflow/ArcanistLookWorkflow.php b/src/workflow/ArcanistLookWorkflow.php
--- a/src/workflow/ArcanistLookWorkflow.php
+++ b/src/workflow/ArcanistLookWorkflow.php
@@ -28,7 +28,7 @@
);
}
- public function runWorkflow() {
+ protected function runWorkflow() {
echo tsprintf(
"%!\n\n",
pht(
diff --git a/src/workflow/ArcanistMarkersWorkflow.php b/src/workflow/ArcanistMarkersWorkflow.php
--- a/src/workflow/ArcanistMarkersWorkflow.php
+++ b/src/workflow/ArcanistMarkersWorkflow.php
@@ -7,7 +7,7 @@
abstract protected function getWorkflowMarkerType();
- public function runWorkflow() {
+ protected function runWorkflow() {
$api = $this->getRepositoryAPI();
$marker_type = $this->getWorkflowMarkerType();
diff --git a/src/workflow/ArcanistPasteWorkflow.php b/src/workflow/ArcanistPasteWorkflow.php
--- a/src/workflow/ArcanistPasteWorkflow.php
+++ b/src/workflow/ArcanistPasteWorkflow.php
@@ -46,7 +46,7 @@
);
}
- public function runWorkflow() {
+ protected function runWorkflow() {
$set_language = $this->getArgument('lang');
$set_title = $this->getArgument('title');
$is_browse = $this->getArgument('browse');
diff --git a/src/workflow/ArcanistUpgradeWorkflow.php b/src/workflow/ArcanistUpgradeWorkflow.php
--- a/src/workflow/ArcanistUpgradeWorkflow.php
+++ b/src/workflow/ArcanistUpgradeWorkflow.php
@@ -23,7 +23,7 @@
return array();
}
- public function runWorkflow() {
+ protected function runWorkflow() {
$log = $this->getLogEngine();
$roots = array(
diff --git a/src/workflow/ArcanistUploadWorkflow.php b/src/workflow/ArcanistUploadWorkflow.php
--- a/src/workflow/ArcanistUploadWorkflow.php
+++ b/src/workflow/ArcanistUploadWorkflow.php
@@ -38,7 +38,7 @@
);
}
- public function runWorkflow() {
+ protected function runWorkflow() {
if (!$this->getArgument('paths')) {
throw new PhutilArgumentUsageException(
pht('Specify one or more paths to files you want to upload.'));
diff --git a/src/workflow/ArcanistWeldWorkflow.php b/src/workflow/ArcanistWeldWorkflow.php
--- a/src/workflow/ArcanistWeldWorkflow.php
+++ b/src/workflow/ArcanistWeldWorkflow.php
@@ -27,7 +27,7 @@
);
}
- public function runWorkflow() {
+ protected function runWorkflow() {
$files = $this->getArgument('files');
if (count($files) < 2) {
diff --git a/src/workflow/ArcanistWorkWorkflow.php b/src/workflow/ArcanistWorkWorkflow.php
--- a/src/workflow/ArcanistWorkWorkflow.php
+++ b/src/workflow/ArcanistWorkWorkflow.php
@@ -50,7 +50,7 @@
->setHelp($help);
}
- public function runWorkflow() {
+ protected function runWorkflow() {
$api = $this->getRepositoryAPI();
$work_engine = $api->getWorkEngine();
diff --git a/src/workflow/ArcanistWorkflow.php b/src/workflow/ArcanistWorkflow.php
--- a/src/workflow/ArcanistWorkflow.php
+++ b/src/workflow/ArcanistWorkflow.php
@@ -51,6 +51,7 @@
private $userName;
private $repositoryAPI;
private $configurationManager;
+ /** @var array|PhutilArgumentParser */
private $arguments = array();
private $command;
@@ -224,7 +225,7 @@
$runtime->pushWorkflow($this);
try {
- $err = $this->runWorkflow($args);
+ $err = $this->runWorkflow();
} catch (Exception $ex) {
$caught = $ex;
}
@@ -259,6 +260,15 @@
throw new PhutilMethodNotImplementedException();
}
+ /**
+ * Modern workflow main method. Must be implemented in child classes.
+ *
+ * @return int exit code
+ */
+ protected function runWorkflow() {
+ throw new PhutilMethodNotImplementedException();
+ }
+
/**
* Finalizes any cleanup operations that need to occur regardless of
* whether the command succeeded or failed.

File Metadata

Mime Type
text/plain
Expires
Mon, Jun 16, 22:04 (1 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1876521
Default Alt Text
D26040.1750111455.diff (8 KB)

Event Timeline