Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14708132
D12380.largetrue.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
118 KB
Referenced Files
None
Subscribers
None
D12380.largetrue.diff
View Options
diff --git a/src/applications/almanac/conduit/AlmanacQueryDevicesConduitAPIMethod.php b/src/applications/almanac/conduit/AlmanacQueryDevicesConduitAPIMethod.php
--- a/src/applications/almanac/conduit/AlmanacQueryDevicesConduitAPIMethod.php
+++ b/src/applications/almanac/conduit/AlmanacQueryDevicesConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Query Almanac devices.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'ids' => 'optional list<id>',
'phids' => 'optional list<phid>',
@@ -19,14 +19,10 @@
) + self::getPagerParamTypes();
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<wild>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
diff --git a/src/applications/almanac/conduit/AlmanacQueryServicesConduitAPIMethod.php b/src/applications/almanac/conduit/AlmanacQueryServicesConduitAPIMethod.php
--- a/src/applications/almanac/conduit/AlmanacQueryServicesConduitAPIMethod.php
+++ b/src/applications/almanac/conduit/AlmanacQueryServicesConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Query Almanac services.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'ids' => 'optional list<id>',
'phids' => 'optional list<phid>',
@@ -21,14 +21,10 @@
) + self::getPagerParamTypes();
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<wild>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
diff --git a/src/applications/arcanist/conduit/ArcanistProjectInfoConduitAPIMethod.php b/src/applications/arcanist/conduit/ArcanistProjectInfoConduitAPIMethod.php
--- a/src/applications/arcanist/conduit/ArcanistProjectInfoConduitAPIMethod.php
+++ b/src/applications/arcanist/conduit/ArcanistProjectInfoConduitAPIMethod.php
@@ -11,17 +11,17 @@
return 'Get information about Arcanist projects.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'name' => 'required string',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-BAD-ARCANIST-PROJECT' => 'No such project exists.',
);
diff --git a/src/applications/audit/conduit/AuditQueryConduitAPIMethod.php b/src/applications/audit/conduit/AuditQueryConduitAPIMethod.php
--- a/src/applications/audit/conduit/AuditQueryConduitAPIMethod.php
+++ b/src/applications/audit/conduit/AuditQueryConduitAPIMethod.php
@@ -10,7 +10,7 @@
return 'Query audit requests.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
$statuses = array(
DiffusionCommitQuery::AUDIT_STATUS_ANY,
DiffusionCommitQuery::AUDIT_STATUS_OPEN,
@@ -30,15 +30,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<dict>';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$query = id(new DiffusionCommitQuery())
diff --git a/src/applications/auth/conduit/PhabricatorAuthQueryPublicKeysConduitAPIMethod.php b/src/applications/auth/conduit/PhabricatorAuthQueryPublicKeysConduitAPIMethod.php
--- a/src/applications/auth/conduit/PhabricatorAuthQueryPublicKeysConduitAPIMethod.php
+++ b/src/applications/auth/conduit/PhabricatorAuthQueryPublicKeysConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Query public keys.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'ids' => 'optional list<id>',
'objectPHIDs' => 'optional list<phid>',
@@ -19,14 +19,10 @@
) + self::getPagerParamTypes();
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'result-set';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
diff --git a/src/applications/chatlog/conduit/ChatLogQueryConduitAPIMethod.php b/src/applications/chatlog/conduit/ChatLogQueryConduitAPIMethod.php
--- a/src/applications/chatlog/conduit/ChatLogQueryConduitAPIMethod.php
+++ b/src/applications/chatlog/conduit/ChatLogQueryConduitAPIMethod.php
@@ -14,21 +14,17 @@
return 'Retrieve chatter.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'channels' => 'optional list<string>',
'limit' => 'optional int (default = 100)',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty list<dict>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$query = new PhabricatorChatLogQuery();
diff --git a/src/applications/chatlog/conduit/ChatLogRecordConduitAPIMethod.php b/src/applications/chatlog/conduit/ChatLogRecordConduitAPIMethod.php
--- a/src/applications/chatlog/conduit/ChatLogRecordConduitAPIMethod.php
+++ b/src/applications/chatlog/conduit/ChatLogRecordConduitAPIMethod.php
@@ -14,20 +14,16 @@
return 'Record chatter.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'logs' => 'required list<dict>',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<id>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$logs = $request->getValue('logs');
if (!is_array($logs)) {
diff --git a/src/applications/conduit/call/ConduitCall.php b/src/applications/conduit/call/ConduitCall.php
--- a/src/applications/conduit/call/ConduitCall.php
+++ b/src/applications/conduit/call/ConduitCall.php
@@ -15,10 +15,10 @@
private $user;
public function __construct($method, array $params) {
- $this->method = $method;
- $this->handler = $this->buildMethodHandler($method);
+ $this->method = $method;
+ $this->handler = $this->buildMethodHandler($method);
- $param_types = $this->handler->defineParamTypes();
+ $param_types = $this->handler->getParamTypes();
foreach ($param_types as $key => $spec) {
if (ConduitAPIMethod::getParameterMetadataKey($key) !== null) {
diff --git a/src/applications/conduit/controller/PhabricatorConduitConsoleController.php b/src/applications/conduit/controller/PhabricatorConduitConsoleController.php
--- a/src/applications/conduit/controller/PhabricatorConduitConsoleController.php
+++ b/src/applications/conduit/controller/PhabricatorConduitConsoleController.php
@@ -48,7 +48,7 @@
break;
}
- $error_types = $method->defineErrorTypes();
+ $error_types = $method->getErrorTypes();
$error_types['ERR-CONDUIT-CORE'] = pht('See error message for details.');
$error_description = array();
foreach ($error_types as $error => $meaning) {
@@ -70,7 +70,7 @@
->appendChild(
id(new AphrontFormStaticControl())
->setLabel('Returns')
- ->setValue($method->defineReturnType()))
+ ->setValue($method->getReturnType()))
->appendChild(
id(new AphrontFormMarkupControl())
->setLabel('Errors')
@@ -80,7 +80,7 @@
'<strong>JSON</strong>. For instance, to enter a list, type: '.
'<tt>["apple", "banana", "cherry"]</tt>'));
- $params = $method->defineParamTypes();
+ $params = $method->getParamTypes();
foreach ($params as $param => $desc) {
$form->appendChild(
id(new AphrontFormTextControl())
diff --git a/src/applications/conduit/method/ConduitAPIMethod.php b/src/applications/conduit/method/ConduitAPIMethod.php
--- a/src/applications/conduit/method/ConduitAPIMethod.php
+++ b/src/applications/conduit/method/ConduitAPIMethod.php
@@ -13,13 +13,30 @@
const METHOD_STATUS_DEPRECATED = 'deprecated';
abstract public function getMethodDescription();
- abstract public function defineParamTypes();
- abstract public function defineReturnType();
- abstract public function defineErrorTypes();
+ abstract protected function defineParamTypes();
+ abstract protected function defineReturnType();
+
+ protected function defineErrorTypes() {
+ return array();
+ }
+
abstract protected function execute(ConduitAPIRequest $request);
+
public function __construct() {}
+ public function getParamTypes() {
+ return $this->defineParamTypes();
+ }
+
+ public function getReturnType() {
+ return $this->defineReturnType();
+ }
+
+ public function getErrorTypes() {
+ return $this->defineErrorTypes();
+ }
+
/**
* This is mostly for compatibility with
* @{class:PhabricatorCursorPagedPolicyAwareQuery}.
@@ -53,7 +70,7 @@
}
public function getErrorDescription($error_code) {
- return idx($this->defineErrorTypes(), $error_code, 'Unknown Error');
+ return idx($this->getErrorTypes(), $error_code, 'Unknown Error');
}
public function getRequiredScope() {
diff --git a/src/applications/conduit/method/ConduitConnectConduitAPIMethod.php b/src/applications/conduit/method/ConduitConnectConduitAPIMethod.php
--- a/src/applications/conduit/method/ConduitConnectConduitAPIMethod.php
+++ b/src/applications/conduit/method/ConduitConnectConduitAPIMethod.php
@@ -18,7 +18,7 @@
return 'Connect a session-based client.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'client' => 'required string',
'clientVersion' => 'required int',
@@ -30,11 +30,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'dict<string, any>';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-BAD-VERSION' =>
'Client/server version mismatch. Upgrade your server or downgrade '.
diff --git a/src/applications/conduit/method/ConduitGetCapabilitiesConduitAPIMethod.php b/src/applications/conduit/method/ConduitGetCapabilitiesConduitAPIMethod.php
--- a/src/applications/conduit/method/ConduitGetCapabilitiesConduitAPIMethod.php
+++ b/src/applications/conduit/method/ConduitGetCapabilitiesConduitAPIMethod.php
@@ -16,18 +16,14 @@
'available on this server.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array();
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'dict<string, any>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$authentication = array(
'token',
diff --git a/src/applications/conduit/method/ConduitGetCertificateConduitAPIMethod.php b/src/applications/conduit/method/ConduitGetCertificateConduitAPIMethod.php
--- a/src/applications/conduit/method/ConduitGetCertificateConduitAPIMethod.php
+++ b/src/applications/conduit/method/ConduitGetCertificateConduitAPIMethod.php
@@ -19,18 +19,18 @@
return 'Retrieve certificate information for a user.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'token' => 'required string',
'host' => 'required string',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'dict<string, any>';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-BAD-TOKEN' => 'Token does not exist or has expired.',
'ERR-RATE-LIMIT' =>
diff --git a/src/applications/conduit/method/ConduitPingConduitAPIMethod.php b/src/applications/conduit/method/ConduitPingConduitAPIMethod.php
--- a/src/applications/conduit/method/ConduitPingConduitAPIMethod.php
+++ b/src/applications/conduit/method/ConduitPingConduitAPIMethod.php
@@ -14,18 +14,14 @@
return 'Basic ping for monitoring or a health-check.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array();
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'string';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
return php_uname('n');
}
diff --git a/src/applications/conduit/method/ConduitQueryConduitAPIMethod.php b/src/applications/conduit/method/ConduitQueryConduitAPIMethod.php
--- a/src/applications/conduit/method/ConduitQueryConduitAPIMethod.php
+++ b/src/applications/conduit/method/ConduitQueryConduitAPIMethod.php
@@ -10,18 +10,14 @@
return 'Returns the parameters of the Conduit methods.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array();
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'dict<dict>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$classes = id(new PhutilSymbolLoader())
->setAncestorClass('ConduitAPIMethod')
@@ -32,8 +28,8 @@
foreach ($classes as $class) {
$names_to_params[$class->getAPIMethodName()] = array(
'description' => $class->getMethodDescription(),
- 'params' => $class->defineParamTypes(),
- 'return' => $class->defineReturnType(),
+ 'params' => $class->getParamTypes(),
+ 'return' => $class->getReturnType(),
);
}
diff --git a/src/applications/conpherence/conduit/ConpherenceCreateThreadConduitAPIMethod.php b/src/applications/conpherence/conduit/ConpherenceCreateThreadConduitAPIMethod.php
--- a/src/applications/conpherence/conduit/ConpherenceCreateThreadConduitAPIMethod.php
+++ b/src/applications/conpherence/conduit/ConpherenceCreateThreadConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Create a new conpherence thread.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'title' => 'optional string',
'message' => 'required string',
@@ -19,11 +19,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_EMPTY_PARTICIPANT_PHIDS' => pht(
'You must specify participant phids.'),
diff --git a/src/applications/conpherence/conduit/ConpherenceQueryThreadConduitAPIMethod.php b/src/applications/conpherence/conduit/ConpherenceQueryThreadConduitAPIMethod.php
--- a/src/applications/conpherence/conduit/ConpherenceQueryThreadConduitAPIMethod.php
+++ b/src/applications/conpherence/conduit/ConpherenceQueryThreadConduitAPIMethod.php
@@ -15,7 +15,7 @@
'updated conpherences for the logged in user.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'ids' => 'optional array<int>',
'phids' => 'optional array<phids>',
@@ -24,14 +24,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$user = $request->getUser();
$ids = $request->getValue('ids', array());
diff --git a/src/applications/conpherence/conduit/ConpherenceQueryTransactionConduitAPIMethod.php b/src/applications/conpherence/conduit/ConpherenceQueryTransactionConduitAPIMethod.php
--- a/src/applications/conpherence/conduit/ConpherenceQueryTransactionConduitAPIMethod.php
+++ b/src/applications/conpherence/conduit/ConpherenceQueryTransactionConduitAPIMethod.php
@@ -15,7 +15,7 @@
'transactions within the conpherence for the logged in user.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'threadID' => 'optional int',
'threadPHID' => 'optional phid',
@@ -24,11 +24,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_USAGE_NO_THREAD_ID' => pht(
'You must specify a thread id or thread phid to query transactions '.
diff --git a/src/applications/conpherence/conduit/ConpherenceUpdateThreadConduitAPIMethod.php b/src/applications/conpherence/conduit/ConpherenceUpdateThreadConduitAPIMethod.php
--- a/src/applications/conpherence/conduit/ConpherenceUpdateThreadConduitAPIMethod.php
+++ b/src/applications/conpherence/conduit/ConpherenceUpdateThreadConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Update an existing conpherence thread.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'id' => 'optional int',
'phid' => 'optional phid',
@@ -22,11 +22,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'bool';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_USAGE_NO_THREAD_ID' => pht(
'You must specify a thread id or thread phid to query transactions '.
diff --git a/src/applications/differential/conduit/DifferentialCloseConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialCloseConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialCloseConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialCloseConduitAPIMethod.php
@@ -11,17 +11,17 @@
return pht('Close a Differential revision.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'revisionID' => 'required int',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'void';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_NOT_FOUND' => 'Revision was not found.',
);
diff --git a/src/applications/differential/conduit/DifferentialCreateCommentConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialCreateCommentConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialCreateCommentConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialCreateCommentConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Add a comment to a Differential revision.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'revision_id' => 'required revisionid',
'message' => 'optional string',
@@ -21,11 +21,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_BAD_REVISION' => 'Bad revision ID.',
);
diff --git a/src/applications/differential/conduit/DifferentialCreateDiffConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialCreateDiffConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialCreateDiffConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialCreateDiffConduitAPIMethod.php
@@ -11,7 +11,7 @@
return 'Create a new Differential diff.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
$vcs_const = $this->formatStringConstants(
array(
@@ -51,15 +51,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
$change_data = $request->getValue('changes');
diff --git a/src/applications/differential/conduit/DifferentialCreateInlineConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialCreateInlineConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialCreateInlineConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialCreateInlineConduitAPIMethod.php
@@ -11,7 +11,7 @@
return 'Add an inline comment to a Differential revision.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'revisionID' => 'optional revisionid',
'diffID' => 'optional diffid',
@@ -23,11 +23,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-BAD-REVISION' => 'Bad revision ID.',
'ERR-BAD-DIFF' => 'Bad diff ID, or diff does not belong to revision.',
diff --git a/src/applications/differential/conduit/DifferentialCreateRawDiffConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialCreateRawDiffConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialCreateRawDiffConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialCreateRawDiffConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Create a new Differential diff from a raw diff source.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'diff' => 'required string',
'repositoryPHID' => 'optional string',
@@ -19,15 +19,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
$raw_diff = $request->getValue('diff');
diff --git a/src/applications/differential/conduit/DifferentialCreateRevisionConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialCreateRevisionConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialCreateRevisionConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialCreateRevisionConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Create a new Differential revision.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
// TODO: Arcanist passes this; prevent fatals after D4191 until Conduit
// version 7 or newer.
@@ -21,11 +21,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_BAD_DIFF' => 'Bad diff ID.',
);
diff --git a/src/applications/differential/conduit/DifferentialFindConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialFindConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialFindConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialFindConduitAPIMethod.php
@@ -19,7 +19,7 @@
return 'Query Differential revisions which match certain criteria.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
$types = array(
'open',
'committable',
@@ -33,15 +33,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty list<dict>';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$type = $request->getValue('query');
$guids = $request->getValue('guids');
diff --git a/src/applications/differential/conduit/DifferentialFinishPostponedLintersConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialFinishPostponedLintersConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialFinishPostponedLintersConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialFinishPostponedLintersConduitAPIMethod.php
@@ -12,18 +12,18 @@
'linters as finished.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'diffID' => 'required diffID',
'linters' => 'required dict',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'void';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-BAD-DIFF' => 'Bad diff ID.',
'ERR-BAD-LINTER' => 'No postponed linter by the given name',
diff --git a/src/applications/differential/conduit/DifferentialGetAllDiffsConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialGetAllDiffsConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialGetAllDiffsConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialGetAllDiffsConduitAPIMethod.php
@@ -20,20 +20,16 @@
return 'Load all diffs for given revisions from Differential.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'revision_ids' => 'required list<int>',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'dict';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$results = array();
$revision_ids = $request->getValue('revision_ids');
diff --git a/src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php
@@ -11,7 +11,7 @@
return 'Retrieve Differential commit messages or message templates.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
$edit_types = array('edit', 'create');
return array(
@@ -21,11 +21,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty string';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_NOT_FOUND' => 'Revision was not found.',
);
diff --git a/src/applications/differential/conduit/DifferentialGetCommitPathsConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialGetCommitPathsConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialGetCommitPathsConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialGetCommitPathsConduitAPIMethod.php
@@ -12,17 +12,17 @@
'Differential revision.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'revision_id' => 'required int',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty list<string>';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_NOT_FOUND' => 'No such revision exists.',
);
diff --git a/src/applications/differential/conduit/DifferentialGetDiffConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialGetDiffConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialGetDiffConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialGetDiffConduitAPIMethod.php
@@ -26,18 +26,18 @@
'or diff id.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'revision_id' => 'optional id',
'diff_id' => 'optional id',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_BAD_DIFF' => 'No such diff exists.',
);
diff --git a/src/applications/differential/conduit/DifferentialGetRawDiffConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialGetRawDiffConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialGetRawDiffConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialGetRawDiffConduitAPIMethod.php
@@ -11,17 +11,17 @@
return pht('Retrieve a raw diff');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'diffID' => 'required diffID',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty string';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_NOT_FOUND' => pht('Diff not found.'),
);
diff --git a/src/applications/differential/conduit/DifferentialGetRevisionCommentsConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialGetRevisionCommentsConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialGetRevisionCommentsConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialGetRevisionCommentsConduitAPIMethod.php
@@ -19,22 +19,17 @@
return 'Retrieve Differential Revision Comments.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'ids' => 'required list<int>',
'inlines' => 'optional bool (deprecated)',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty list<dict<string, wild>>';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
$results = array();
diff --git a/src/applications/differential/conduit/DifferentialGetRevisionConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialGetRevisionConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialGetRevisionConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialGetRevisionConduitAPIMethod.php
@@ -19,17 +19,17 @@
return 'Load the content of a revision from Differential.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'revision_id' => 'required id',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_BAD_REVISION' => 'No such revision exists.',
);
diff --git a/src/applications/differential/conduit/DifferentialParseCommitMessageConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialParseCommitMessageConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialParseCommitMessageConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialParseCommitMessageConduitAPIMethod.php
@@ -13,21 +13,17 @@
return pht('Parse commit messages for Differential fields.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'corpus' => 'required string',
'partial' => 'optional bool',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
$corpus = $request->getValue('corpus');
diff --git a/src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialQueryConduitAPIMethod.php
@@ -11,7 +11,7 @@
return 'Query Differential revisions which match certain criteria.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
$hash_types = ArcanistDifferentialRevisionHash::getTypes();
$hash_const = $this->formatStringConstants($hash_types);
@@ -48,11 +48,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<dict>';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-INVALID-PARAMETER' => 'Missing or malformed parameter.',
);
diff --git a/src/applications/differential/conduit/DifferentialQueryDiffsConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialQueryDiffsConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialQueryDiffsConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialQueryDiffsConduitAPIMethod.php
@@ -11,18 +11,14 @@
return pht('Query differential diffs which match certain criteria.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'ids' => 'optional list<uint>',
'revisionIDs' => 'optional list<uint>',
);
}
- public function defineErrorTypes() {
- return array();
- }
-
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<dict>';
}
diff --git a/src/applications/differential/conduit/DifferentialSetDiffPropertyConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialSetDiffPropertyConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialSetDiffPropertyConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialSetDiffPropertyConduitAPIMethod.php
@@ -11,7 +11,7 @@
return 'Attach properties to Differential diffs.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'diff_id' => 'required diff_id',
'name' => 'required string',
@@ -19,11 +19,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'void';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_NOT_FOUND' => 'Diff was not found.',
);
diff --git a/src/applications/differential/conduit/DifferentialUpdateRevisionConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialUpdateRevisionConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialUpdateRevisionConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialUpdateRevisionConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Update a Differential revision.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'id' => 'required revisionid',
'diffid' => 'required diffid',
@@ -20,11 +20,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_BAD_DIFF' => 'Bad diff ID.',
'ERR_BAD_REVISION' => 'Bad revision ID.',
diff --git a/src/applications/differential/conduit/DifferentialUpdateUnitResultsConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialUpdateUnitResultsConduitAPIMethod.php
--- a/src/applications/differential/conduit/DifferentialUpdateUnitResultsConduitAPIMethod.php
+++ b/src/applications/differential/conduit/DifferentialUpdateUnitResultsConduitAPIMethod.php
@@ -11,7 +11,7 @@
return 'Update arc unit results for a postponed test.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'diff_id' => 'required diff_id',
'file' => 'required string',
@@ -23,11 +23,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'void';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_BAD_DIFF' => 'Bad diff ID.',
'ERR_NO_RESULTS' => 'Could not find the postponed test',
diff --git a/src/applications/diffusion/conduit/DiffusionBranchQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionBranchQueryConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionBranchQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionBranchQueryConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Determine what branches exist for a repository.');
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<dict>';
}
diff --git a/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php
@@ -13,7 +13,7 @@
'(optional) commit.';
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'array';
}
diff --git a/src/applications/diffusion/conduit/DiffusionCommitParentsQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionCommitParentsQueryConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionCommitParentsQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionCommitParentsQueryConduitAPIMethod.php
@@ -12,7 +12,7 @@
"Get the commit identifiers for a commit's parent or parents.");
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<string>';
}
diff --git a/src/applications/diffusion/conduit/DiffusionCreateCommentConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionCreateCommentConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionCreateCommentConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionCreateCommentConduitAPIMethod.php
@@ -17,7 +17,7 @@
'be triggered. Defaults to "comment".';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'phid' => 'required string',
'action' => 'optional string',
@@ -26,11 +26,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'bool';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_BAD_COMMIT' => 'No commit found with that PHID',
'ERR_BAD_ACTION' => 'Invalid action type',
diff --git a/src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php
@@ -15,7 +15,7 @@
'(optional) commit.';
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'array';
}
diff --git a/src/applications/diffusion/conduit/DiffusionExistsQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionExistsQueryConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionExistsQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionExistsQueryConduitAPIMethod.php
@@ -11,7 +11,7 @@
return 'Determine if code exists in a version control system.';
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'bool';
}
diff --git a/src/applications/diffusion/conduit/DiffusionFileContentQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionFileContentQueryConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionFileContentQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionFileContentQueryConduitAPIMethod.php
@@ -11,7 +11,7 @@
return 'Retrieve file content from a repository.';
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'array';
}
diff --git a/src/applications/diffusion/conduit/DiffusionFindSymbolsConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionFindSymbolsConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionFindSymbolsConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionFindSymbolsConduitAPIMethod.php
@@ -11,7 +11,7 @@
return 'Retrieve Diffusion symbol information.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'name' => 'optional string',
'namePrefix' => 'optional string',
@@ -21,15 +21,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty list<dict>';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$name = $request->getValue('name');
$name_prefix = $request->getValue('namePrefix');
diff --git a/src/applications/diffusion/conduit/DiffusionGetCommitsConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionGetCommitsConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionGetCommitsConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionGetCommitsConduitAPIMethod.php
@@ -19,20 +19,16 @@
return pht('Obsoleted by diffusion.querycommits.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'commits' => 'required list<string>',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty list<dict<string, wild>>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$results = array();
diff --git a/src/applications/diffusion/conduit/DiffusionGetLintMessagesConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionGetLintMessagesConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionGetLintMessagesConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionGetLintMessagesConduitAPIMethod.php
@@ -15,7 +15,7 @@
return 'Get lint messages for existing code.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'arcanistProject' => 'required string',
'branch' => 'optional string',
@@ -24,14 +24,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<dict>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$project = id(new PhabricatorRepositoryArcanistProject())->loadOneWhere(
'name = %s',
diff --git a/src/applications/diffusion/conduit/DiffusionGetRecentCommitsByPathConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionGetRecentCommitsByPathConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionGetRecentCommitsByPathConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionGetRecentCommitsByPathConduitAPIMethod.php
@@ -13,7 +13,7 @@
return 'Get commit identifiers for recent commits affecting a given path.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'callsign' => 'required string',
'path' => 'required string',
@@ -22,15 +22,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty list<string>';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$drequest = DiffusionRequest::newFromDictionary(
array(
diff --git a/src/applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php
@@ -14,7 +14,7 @@
'commit and path.';
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'array';
}
diff --git a/src/applications/diffusion/conduit/DiffusionLastModifiedQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionLastModifiedQueryConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionLastModifiedQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionLastModifiedQueryConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Get the commits at which paths were last modified.');
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'map<string, string>';
}
diff --git a/src/applications/diffusion/conduit/DiffusionLookSoonConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionLookSoonConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionLookSoonConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionLookSoonConduitAPIMethod.php
@@ -18,21 +18,17 @@
'commits to that repository.');
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'void';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'callsigns' => 'required list<string>',
'urgency' => 'optional string',
);
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
// NOTE: The "urgency" parameter does nothing, it is just a hilarious joke
// which exemplifies the boundless clever wit of this project.
diff --git a/src/applications/diffusion/conduit/DiffusionMergedCommitsQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionMergedCommitsQueryConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionMergedCommitsQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionMergedCommitsQueryConduitAPIMethod.php
@@ -12,7 +12,7 @@
'Merged commit information for a specific commit in a repository.';
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'array';
}
diff --git a/src/applications/diffusion/conduit/DiffusionQueryCommitsConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionQueryCommitsConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionQueryCommitsConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionQueryCommitsConduitAPIMethod.php
@@ -11,11 +11,11 @@
return pht('Retrieve information about commits.');
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'map<string, dict>';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'ids' => 'optional list<int>',
'phids' => 'optional list<phid>',
@@ -26,10 +26,6 @@
) + $this->getPagerParamTypes();
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$need_messages = $request->getValue('needMessages');
$bypass_cache = $request->getValue('bypassCache');
diff --git a/src/applications/diffusion/conduit/DiffusionQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionQueryConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionQueryConduitAPIMethod.php
@@ -34,7 +34,7 @@
return $this->getDiffusionRequest()->getRepository();
}
- final public function defineErrorTypes() {
+ final protected function defineErrorTypes() {
return $this->defineCustomErrorTypes() +
array(
'ERR-UNKNOWN-REPOSITORY' =>
@@ -53,7 +53,7 @@
return array();
}
- final public function defineParamTypes() {
+ final protected function defineParamTypes() {
return $this->defineCustomParamTypes() +
array(
'callsign' => 'required string',
diff --git a/src/applications/diffusion/conduit/DiffusionQueryPathsConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionQueryPathsConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionQueryPathsConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionQueryPathsConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Filename search on a repository.');
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<string>';
}
diff --git a/src/applications/diffusion/conduit/DiffusionRawDiffQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionRawDiffQueryConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionRawDiffQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionRawDiffQueryConduitAPIMethod.php
@@ -13,7 +13,7 @@
'(optional) path.';
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'string';
}
diff --git a/src/applications/diffusion/conduit/DiffusionRefsQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionRefsQueryConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionRefsQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionRefsQueryConduitAPIMethod.php
@@ -12,7 +12,7 @@
'Query a git repository for ref information at a specific commit.';
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'array';
}
diff --git a/src/applications/diffusion/conduit/DiffusionResolveRefsConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionResolveRefsConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionResolveRefsConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionResolveRefsConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Resolve references into stable, canonical identifiers.');
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'dict<string, list<dict<string, wild>>>';
}
diff --git a/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php
@@ -11,7 +11,7 @@
return 'Search (grep) a repository at a specific path and commit.';
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'array';
}
diff --git a/src/applications/diffusion/conduit/DiffusionTagsQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionTagsQueryConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionTagsQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionTagsQueryConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Retrieve information about tags in a repository.');
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'array';
}
diff --git a/src/applications/diffusion/conduit/DiffusionUpdateCoverageConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionUpdateCoverageConduitAPIMethod.php
--- a/src/applications/diffusion/conduit/DiffusionUpdateCoverageConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionUpdateCoverageConduitAPIMethod.php
@@ -15,11 +15,11 @@
return pht('Publish coverage information for a repository.');
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'void';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'repositoryPHID' => 'required phid',
'branch' => 'required string',
@@ -28,10 +28,6 @@
);
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
diff --git a/src/applications/diffusion/query/DiffusionQuery.php b/src/applications/diffusion/query/DiffusionQuery.php
--- a/src/applications/diffusion/query/DiffusionQuery.php
+++ b/src/applications/diffusion/query/DiffusionQuery.php
@@ -63,7 +63,7 @@
// If the method we're calling doesn't actually take some of the implicit
// parameters we derive from the DiffusionRequest, omit them.
$method_object = ConduitAPIMethod::getConduitMethod($method);
- $method_params = $method_object->defineParamTypes();
+ $method_params = $method_object->getParamTypes();
foreach ($core_params as $key => $value) {
if (empty($method_params[$key])) {
unset($core_params[$key]);
diff --git a/src/applications/feed/conduit/FeedPublishConduitAPIMethod.php b/src/applications/feed/conduit/FeedPublishConduitAPIMethod.php
--- a/src/applications/feed/conduit/FeedPublishConduitAPIMethod.php
+++ b/src/applications/feed/conduit/FeedPublishConduitAPIMethod.php
@@ -14,7 +14,7 @@
return 'Publish a story to the feed.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'type' => 'required string',
'data' => 'required dict',
@@ -22,12 +22,7 @@
);
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty phid';
}
diff --git a/src/applications/feed/conduit/FeedQueryConduitAPIMethod.php b/src/applications/feed/conduit/FeedQueryConduitAPIMethod.php
--- a/src/applications/feed/conduit/FeedQueryConduitAPIMethod.php
+++ b/src/applications/feed/conduit/FeedQueryConduitAPIMethod.php
@@ -18,7 +18,7 @@
return 100;
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'filterPHIDs' => 'optional list <phid>',
'limit' => 'optional int (default '.$this->getDefaultLimit().')',
@@ -37,7 +37,7 @@
);
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
$view_types = array_keys($this->getSupportedViewTypes());
$view_types = implode(', ', $view_types);
@@ -48,7 +48,7 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
diff --git a/src/applications/files/conduit/FileAllocateConduitAPIMethod.php b/src/applications/files/conduit/FileAllocateConduitAPIMethod.php
--- a/src/applications/files/conduit/FileAllocateConduitAPIMethod.php
+++ b/src/applications/files/conduit/FileAllocateConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Prepare to upload a file.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'name' => 'string',
'contentLength' => 'int',
@@ -20,14 +20,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'map<string, wild>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
diff --git a/src/applications/files/conduit/FileDownloadConduitAPIMethod.php b/src/applications/files/conduit/FileDownloadConduitAPIMethod.php
--- a/src/applications/files/conduit/FileDownloadConduitAPIMethod.php
+++ b/src/applications/files/conduit/FileDownloadConduitAPIMethod.php
@@ -10,17 +10,17 @@
return 'Download a file from the server.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'phid' => 'required phid',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty base64-bytes';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-BAD-PHID' => 'No such file exists.',
);
diff --git a/src/applications/files/conduit/FileInfoConduitAPIMethod.php b/src/applications/files/conduit/FileInfoConduitAPIMethod.php
--- a/src/applications/files/conduit/FileInfoConduitAPIMethod.php
+++ b/src/applications/files/conduit/FileInfoConduitAPIMethod.php
@@ -10,18 +10,18 @@
return 'Get information about a file.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'phid' => 'optional phid',
'id' => 'optional id',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-NOT-FOUND' => 'No such file exists.',
);
diff --git a/src/applications/files/conduit/FileQueryChunksConduitAPIMethod.php b/src/applications/files/conduit/FileQueryChunksConduitAPIMethod.php
--- a/src/applications/files/conduit/FileQueryChunksConduitAPIMethod.php
+++ b/src/applications/files/conduit/FileQueryChunksConduitAPIMethod.php
@@ -11,20 +11,16 @@
return pht('Get information about file chunks.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'filePHID' => 'phid',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<wild>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
diff --git a/src/applications/files/conduit/FileUploadChunkConduitAPIMethod.php b/src/applications/files/conduit/FileUploadChunkConduitAPIMethod.php
--- a/src/applications/files/conduit/FileUploadChunkConduitAPIMethod.php
+++ b/src/applications/files/conduit/FileUploadChunkConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Upload a chunk of file data to the server.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'filePHID' => 'phid',
'byteStart' => 'int',
@@ -20,14 +20,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'void';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
diff --git a/src/applications/files/conduit/FileUploadConduitAPIMethod.php b/src/applications/files/conduit/FileUploadConduitAPIMethod.php
--- a/src/applications/files/conduit/FileUploadConduitAPIMethod.php
+++ b/src/applications/files/conduit/FileUploadConduitAPIMethod.php
@@ -10,7 +10,7 @@
return 'Upload a file to the server.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'data_base64' => 'required nonempty base64-bytes',
'name' => 'optional string',
@@ -19,15 +19,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty guid';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
diff --git a/src/applications/files/conduit/FileUploadHashConduitAPIMethod.php b/src/applications/files/conduit/FileUploadHashConduitAPIMethod.php
--- a/src/applications/files/conduit/FileUploadHashConduitAPIMethod.php
+++ b/src/applications/files/conduit/FileUploadHashConduitAPIMethod.php
@@ -11,22 +11,17 @@
return 'Upload a file to the server using content hash.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'hash' => 'required nonempty string',
'name' => 'required nonempty string',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'phid or null';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$hash = $request->getValue('hash');
$name = $request->getValue('name');
diff --git a/src/applications/flag/conduit/FlagDeleteConduitAPIMethod.php b/src/applications/flag/conduit/FlagDeleteConduitAPIMethod.php
--- a/src/applications/flag/conduit/FlagDeleteConduitAPIMethod.php
+++ b/src/applications/flag/conduit/FlagDeleteConduitAPIMethod.php
@@ -10,18 +10,18 @@
return 'Clear a flag.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'id' => 'optional id',
'objectPHID' => 'optional phid',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'dict | null';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_NOT_FOUND' => 'Bad flag ID.',
'ERR_WRONG_USER' => 'You are not the creator of this flag.',
diff --git a/src/applications/flag/conduit/FlagEditConduitAPIMethod.php b/src/applications/flag/conduit/FlagEditConduitAPIMethod.php
--- a/src/applications/flag/conduit/FlagEditConduitAPIMethod.php
+++ b/src/applications/flag/conduit/FlagEditConduitAPIMethod.php
@@ -10,7 +10,7 @@
return 'Create or modify a flag.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'objectPHID' => 'required phid',
'color' => 'optional int',
@@ -18,15 +18,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'dict';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$user = $request->getUser()->getPHID();
$phid = $request->getValue('objectPHID');
diff --git a/src/applications/flag/conduit/FlagQueryConduitAPIMethod.php b/src/applications/flag/conduit/FlagQueryConduitAPIMethod.php
--- a/src/applications/flag/conduit/FlagQueryConduitAPIMethod.php
+++ b/src/applications/flag/conduit/FlagQueryConduitAPIMethod.php
@@ -10,7 +10,7 @@
return 'Query flag markers.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'ownerPHIDs' => 'optional list<phid>',
'types' => 'optional list<type>',
@@ -21,15 +21,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<dict>';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$query = new PhabricatorFlagQuery();
$query->setViewer($request->getUser());
diff --git a/src/applications/harbormaster/conduit/HarbormasterQueryBuildablesConduitAPIMethod.php b/src/applications/harbormaster/conduit/HarbormasterQueryBuildablesConduitAPIMethod.php
--- a/src/applications/harbormaster/conduit/HarbormasterQueryBuildablesConduitAPIMethod.php
+++ b/src/applications/harbormaster/conduit/HarbormasterQueryBuildablesConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Query Harbormaster buildables.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'ids' => 'optional list<id>',
'phids' => 'optional list<phid>',
@@ -21,14 +21,10 @@
) + self::getPagerParamTypes();
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'wild';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
diff --git a/src/applications/harbormaster/conduit/HarbormasterQueryBuildsConduitAPIMethod.php b/src/applications/harbormaster/conduit/HarbormasterQueryBuildsConduitAPIMethod.php
--- a/src/applications/harbormaster/conduit/HarbormasterQueryBuildsConduitAPIMethod.php
+++ b/src/applications/harbormaster/conduit/HarbormasterQueryBuildsConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Query Harbormaster builds.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'ids' => 'optional list<id>',
'phids' => 'optional list<phid>',
@@ -21,14 +21,10 @@
) + self::getPagerParamTypes();
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'wild';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
diff --git a/src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php b/src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php
--- a/src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php
+++ b/src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php
@@ -13,7 +13,7 @@
'external system.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
$type_const = $this->formatStringConstants(array('pass', 'fail'));
return array(
@@ -22,14 +22,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'void';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
diff --git a/src/applications/macro/conduit/MacroCreateMemeConduitAPIMethod.php b/src/applications/macro/conduit/MacroCreateMemeConduitAPIMethod.php
--- a/src/applications/macro/conduit/MacroCreateMemeConduitAPIMethod.php
+++ b/src/applications/macro/conduit/MacroCreateMemeConduitAPIMethod.php
@@ -14,7 +14,7 @@
return pht('Generate a meme.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'macroName' => 'string',
'upperText' => 'optional string',
@@ -22,11 +22,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'string';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-NOT-FOUND' => 'Macro was not found.',
);
diff --git a/src/applications/macro/conduit/MacroQueryConduitAPIMethod.php b/src/applications/macro/conduit/MacroQueryConduitAPIMethod.php
--- a/src/applications/macro/conduit/MacroQueryConduitAPIMethod.php
+++ b/src/applications/macro/conduit/MacroQueryConduitAPIMethod.php
@@ -10,7 +10,7 @@
return 'Retrieve image macro information.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'authorPHIDs' => 'optional list<phid>',
'phids' => 'optional list<phid>',
@@ -20,15 +20,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<dict>';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$query = id(new PhabricatorMacroQuery())
->setViewer($request->getUser())
diff --git a/src/applications/maniphest/conduit/ManiphestConduitAPIMethod.php b/src/applications/maniphest/conduit/ManiphestConduitAPIMethod.php
--- a/src/applications/maniphest/conduit/ManiphestConduitAPIMethod.php
+++ b/src/applications/maniphest/conduit/ManiphestConduitAPIMethod.php
@@ -7,7 +7,7 @@
'PhabricatorManiphestApplication');
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-INVALID-PARAMETER' => 'Missing or malformed parameter.',
);
diff --git a/src/applications/maniphest/conduit/ManiphestCreateTaskConduitAPIMethod.php b/src/applications/maniphest/conduit/ManiphestCreateTaskConduitAPIMethod.php
--- a/src/applications/maniphest/conduit/ManiphestCreateTaskConduitAPIMethod.php
+++ b/src/applications/maniphest/conduit/ManiphestCreateTaskConduitAPIMethod.php
@@ -11,15 +11,15 @@
return 'Create a new Maniphest task.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return $this->getTaskFields($is_new = true);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-INVALID-PARAMETER' => 'Missing or malformed parameter.',
);
diff --git a/src/applications/maniphest/conduit/ManiphestGetTaskTransactionsConduitAPIMethod.php b/src/applications/maniphest/conduit/ManiphestGetTaskTransactionsConduitAPIMethod.php
--- a/src/applications/maniphest/conduit/ManiphestGetTaskTransactionsConduitAPIMethod.php
+++ b/src/applications/maniphest/conduit/ManiphestGetTaskTransactionsConduitAPIMethod.php
@@ -11,21 +11,16 @@
return 'Retrieve Maniphest Task Transactions.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'ids' => 'required list<int>',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty list<dict<string, wild>>';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$results = array();
$task_ids = $request->getValue('ids');
diff --git a/src/applications/maniphest/conduit/ManiphestInfoConduitAPIMethod.php b/src/applications/maniphest/conduit/ManiphestInfoConduitAPIMethod.php
--- a/src/applications/maniphest/conduit/ManiphestInfoConduitAPIMethod.php
+++ b/src/applications/maniphest/conduit/ManiphestInfoConduitAPIMethod.php
@@ -10,17 +10,17 @@
return 'Retrieve information about a Maniphest task, given its id.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'task_id' => 'required id',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_BAD_TASK' => 'No such maniphest task exists',
);
diff --git a/src/applications/maniphest/conduit/ManiphestQueryConduitAPIMethod.php b/src/applications/maniphest/conduit/ManiphestQueryConduitAPIMethod.php
--- a/src/applications/maniphest/conduit/ManiphestQueryConduitAPIMethod.php
+++ b/src/applications/maniphest/conduit/ManiphestQueryConduitAPIMethod.php
@@ -10,7 +10,7 @@
return 'Execute complex searches for Maniphest tasks.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
$statuses = array(
ManiphestTaskQuery::STATUS_ANY,
ManiphestTaskQuery::STATUS_OPEN,
@@ -47,14 +47,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$query = id(new ManiphestTaskQuery())
->setViewer($request->getUser())
diff --git a/src/applications/maniphest/conduit/ManiphestQueryStatusesConduitAPIMethod.php b/src/applications/maniphest/conduit/ManiphestQueryStatusesConduitAPIMethod.php
--- a/src/applications/maniphest/conduit/ManiphestQueryStatusesConduitAPIMethod.php
+++ b/src/applications/maniphest/conduit/ManiphestQueryStatusesConduitAPIMethod.php
@@ -11,18 +11,14 @@
return 'Retrieve information about possible Maniphest Task status values.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array();
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict<string, wild>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$results = array(
'defaultStatus' => ManiphestTaskStatus::getDefaultStatus(),
diff --git a/src/applications/maniphest/conduit/ManiphestUpdateConduitAPIMethod.php b/src/applications/maniphest/conduit/ManiphestUpdateConduitAPIMethod.php
--- a/src/applications/maniphest/conduit/ManiphestUpdateConduitAPIMethod.php
+++ b/src/applications/maniphest/conduit/ManiphestUpdateConduitAPIMethod.php
@@ -10,7 +10,7 @@
return 'Update an existing Maniphest task.';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-BAD-TASK' => 'No such maniphest task exists.',
'ERR-INVALID-PARAMETER' => 'Missing or malformed parameter.',
@@ -18,11 +18,11 @@
);
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return $this->getTaskFields($is_new = false);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
diff --git a/src/applications/nuance/conduit/NuanceCreateItemConduitAPIMethod.php b/src/applications/nuance/conduit/NuanceCreateItemConduitAPIMethod.php
--- a/src/applications/nuance/conduit/NuanceCreateItemConduitAPIMethod.php
+++ b/src/applications/nuance/conduit/NuanceCreateItemConduitAPIMethod.php
@@ -10,7 +10,7 @@
return pht('Create a new item.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'requestorPHID' => 'required string',
'sourcePHID' => 'required string',
@@ -18,11 +18,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-NO-REQUESTOR-PHID' => pht('Items must have a requestor.'),
'ERR-NO-SOURCE-PHID' => pht('Items must have a source.'),
diff --git a/src/applications/owners/conduit/OwnersQueryConduitAPIMethod.php b/src/applications/owners/conduit/OwnersQueryConduitAPIMethod.php
--- a/src/applications/owners/conduit/OwnersQueryConduitAPIMethod.php
+++ b/src/applications/owners/conduit/OwnersQueryConduitAPIMethod.php
@@ -13,7 +13,7 @@
'of.) You should only provide at most one search query.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'userOwner' => 'optional string',
'projectOwner' => 'optional string',
@@ -23,11 +23,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'dict<phid -> dict of package info>';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-INVALID-USAGE' =>
'Provide one of a single owner phid (user/project), a single '.
diff --git a/src/applications/passphrase/conduit/PassphraseQueryConduitAPIMethod.php b/src/applications/passphrase/conduit/PassphraseQueryConduitAPIMethod.php
--- a/src/applications/passphrase/conduit/PassphraseQueryConduitAPIMethod.php
+++ b/src/applications/passphrase/conduit/PassphraseQueryConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Query credentials.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'ids' => 'optional list<int>',
'phids' => 'optional list<phid>',
@@ -20,14 +20,10 @@
) + $this->getPagerParamTypes();
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<dict>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$query = id(new PassphraseCredentialQuery())
->setViewer($request->getUser());
diff --git a/src/applications/paste/conduit/PasteCreateConduitAPIMethod.php b/src/applications/paste/conduit/PasteCreateConduitAPIMethod.php
--- a/src/applications/paste/conduit/PasteCreateConduitAPIMethod.php
+++ b/src/applications/paste/conduit/PasteCreateConduitAPIMethod.php
@@ -10,7 +10,7 @@
return 'Create a new paste.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'content' => 'required string',
'title' => 'optional string',
@@ -18,11 +18,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-NO-PASTE' => 'Paste may not be empty.',
);
diff --git a/src/applications/paste/conduit/PasteInfoConduitAPIMethod.php b/src/applications/paste/conduit/PasteInfoConduitAPIMethod.php
--- a/src/applications/paste/conduit/PasteInfoConduitAPIMethod.php
+++ b/src/applications/paste/conduit/PasteInfoConduitAPIMethod.php
@@ -18,17 +18,17 @@
return 'Retrieve an array of information about a paste.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'paste_id' => 'required id',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_BAD_PASTE' => 'No such paste exists',
);
diff --git a/src/applications/paste/conduit/PasteQueryConduitAPIMethod.php b/src/applications/paste/conduit/PasteQueryConduitAPIMethod.php
--- a/src/applications/paste/conduit/PasteQueryConduitAPIMethod.php
+++ b/src/applications/paste/conduit/PasteQueryConduitAPIMethod.php
@@ -10,7 +10,7 @@
return 'Query Pastes.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'ids' => 'optional list<int>',
'phids' => 'optional list<phid>',
@@ -20,14 +20,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<dict>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$query = id(new PhabricatorPasteQuery())
->setViewer($request->getUser())
diff --git a/src/applications/people/conduit/UserAddStatusConduitAPIMethod.php b/src/applications/people/conduit/UserAddStatusConduitAPIMethod.php
--- a/src/applications/people/conduit/UserAddStatusConduitAPIMethod.php
+++ b/src/applications/people/conduit/UserAddStatusConduitAPIMethod.php
@@ -20,7 +20,7 @@
'Calendar application.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
$status_const = $this->formatStringConstants(array('away', 'sporadic'));
return array(
@@ -31,11 +31,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'void';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-BAD-EPOCH' => "'toEpoch' must be bigger than 'fromEpoch'.",
'ERR-OVERLAP' =>
diff --git a/src/applications/people/conduit/UserDisableConduitAPIMethod.php b/src/applications/people/conduit/UserDisableConduitAPIMethod.php
--- a/src/applications/people/conduit/UserDisableConduitAPIMethod.php
+++ b/src/applications/people/conduit/UserDisableConduitAPIMethod.php
@@ -10,17 +10,17 @@
return 'Permanently disable specified users (admin only).';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'phids' => 'required list<phid>',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'void';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-PERMISSIONS' => 'Only admins can call this method.',
'ERR-BAD-PHID' => 'Non existent user PHID.',
diff --git a/src/applications/people/conduit/UserEnableConduitAPIMethod.php b/src/applications/people/conduit/UserEnableConduitAPIMethod.php
--- a/src/applications/people/conduit/UserEnableConduitAPIMethod.php
+++ b/src/applications/people/conduit/UserEnableConduitAPIMethod.php
@@ -10,17 +10,17 @@
return 'Re-enable specified users (admin only).';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'phids' => 'required list<phid>',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'void';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-PERMISSIONS' => 'Only admins can call this method.',
'ERR-BAD-PHID' => 'Non existent user PHID.',
diff --git a/src/applications/people/conduit/UserFindConduitAPIMethod.php b/src/applications/people/conduit/UserFindConduitAPIMethod.php
--- a/src/applications/people/conduit/UserFindConduitAPIMethod.php
+++ b/src/applications/people/conduit/UserFindConduitAPIMethod.php
@@ -18,21 +18,16 @@
return pht('Lookup PHIDs by username. Obsoleted by "user.query".');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'aliases' => 'required list<string>',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict<string, phid>';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$users = id(new PhabricatorPeopleQuery())
->setViewer($request->getUser())
diff --git a/src/applications/people/conduit/UserQueryConduitAPIMethod.php b/src/applications/people/conduit/UserQueryConduitAPIMethod.php
--- a/src/applications/people/conduit/UserQueryConduitAPIMethod.php
+++ b/src/applications/people/conduit/UserQueryConduitAPIMethod.php
@@ -10,7 +10,7 @@
return 'Query users.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'usernames' => 'optional list<string>',
'emails' => 'optional list<string>',
@@ -22,11 +22,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<dict>';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-INVALID-PARAMETER' => 'Missing or malformed parameter.',
);
diff --git a/src/applications/people/conduit/UserRemoveStatusConduitAPIMethod.php b/src/applications/people/conduit/UserRemoveStatusConduitAPIMethod.php
--- a/src/applications/people/conduit/UserRemoveStatusConduitAPIMethod.php
+++ b/src/applications/people/conduit/UserRemoveStatusConduitAPIMethod.php
@@ -20,18 +20,18 @@
'Calendar application.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'fromEpoch' => 'required int',
'toEpoch' => 'required int',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'int';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-BAD-EPOCH' => "'toEpoch' must be bigger than 'fromEpoch'.",
);
diff --git a/src/applications/people/conduit/UserWhoAmIConduitAPIMethod.php b/src/applications/people/conduit/UserWhoAmIConduitAPIMethod.php
--- a/src/applications/people/conduit/UserWhoAmIConduitAPIMethod.php
+++ b/src/applications/people/conduit/UserWhoAmIConduitAPIMethod.php
@@ -10,18 +10,14 @@
return 'Retrieve information about the logged-in user.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array();
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict<string, wild>';
}
- public function defineErrorTypes() {
- return array();
- }
-
public function getRequiredScope() {
return PhabricatorOAuthServerScope::SCOPE_WHOAMI;
}
diff --git a/src/applications/phame/conduit/PhameCreatePostConduitAPIMethod.php b/src/applications/phame/conduit/PhameCreatePostConduitAPIMethod.php
--- a/src/applications/phame/conduit/PhameCreatePostConduitAPIMethod.php
+++ b/src/applications/phame/conduit/PhameCreatePostConduitAPIMethod.php
@@ -14,7 +14,7 @@
return self::METHOD_STATUS_UNSTABLE;
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'blogPHID' => 'required phid',
'title' => 'required string',
@@ -25,11 +25,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<dict>';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-INVALID-PARAMETER' =>
pht('Missing or malformed parameter.'),
diff --git a/src/applications/phame/conduit/PhameQueryConduitAPIMethod.php b/src/applications/phame/conduit/PhameQueryConduitAPIMethod.php
--- a/src/applications/phame/conduit/PhameQueryConduitAPIMethod.php
+++ b/src/applications/phame/conduit/PhameQueryConduitAPIMethod.php
@@ -14,7 +14,7 @@
return self::METHOD_STATUS_UNSTABLE;
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'ids' => 'optional list<int>',
'phids' => 'optional list<phid>',
@@ -24,14 +24,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<dict>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$query = new PhameBlogQuery();
diff --git a/src/applications/phame/conduit/PhameQueryPostsConduitAPIMethod.php b/src/applications/phame/conduit/PhameQueryPostsConduitAPIMethod.php
--- a/src/applications/phame/conduit/PhameQueryPostsConduitAPIMethod.php
+++ b/src/applications/phame/conduit/PhameQueryPostsConduitAPIMethod.php
@@ -14,7 +14,7 @@
return self::METHOD_STATUS_UNSTABLE;
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'ids' => 'optional list<int>',
'phids' => 'optional list<phid>',
@@ -29,15 +29,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<dict>';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$query = new PhamePostQuery();
diff --git a/src/applications/phid/conduit/PHIDInfoConduitAPIMethod.php b/src/applications/phid/conduit/PHIDInfoConduitAPIMethod.php
--- a/src/applications/phid/conduit/PHIDInfoConduitAPIMethod.php
+++ b/src/applications/phid/conduit/PHIDInfoConduitAPIMethod.php
@@ -18,17 +18,17 @@
return 'Retrieve information about an arbitrary PHID.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'phid' => 'required phid',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict<string, wild>';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-BAD-PHID' => 'No such object exists.',
);
diff --git a/src/applications/phid/conduit/PHIDLookupConduitAPIMethod.php b/src/applications/phid/conduit/PHIDLookupConduitAPIMethod.php
--- a/src/applications/phid/conduit/PHIDLookupConduitAPIMethod.php
+++ b/src/applications/phid/conduit/PHIDLookupConduitAPIMethod.php
@@ -10,20 +10,16 @@
return 'Look up objects by name.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'names' => 'required list<string>',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict<string, wild>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$names = $request->getValue('names');
diff --git a/src/applications/phid/conduit/PHIDQueryConduitAPIMethod.php b/src/applications/phid/conduit/PHIDQueryConduitAPIMethod.php
--- a/src/applications/phid/conduit/PHIDQueryConduitAPIMethod.php
+++ b/src/applications/phid/conduit/PHIDQueryConduitAPIMethod.php
@@ -10,20 +10,16 @@
return 'Retrieve information about arbitrary PHIDs.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'phids' => 'required list<phid>',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict<string, wild>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$phids = $request->getValue('phids');
diff --git a/src/applications/phragment/conduit/PhragmentGetPatchConduitAPIMethod.php b/src/applications/phragment/conduit/PhragmentGetPatchConduitAPIMethod.php
--- a/src/applications/phragment/conduit/PhragmentGetPatchConduitAPIMethod.php
+++ b/src/applications/phragment/conduit/PhragmentGetPatchConduitAPIMethod.php
@@ -15,18 +15,18 @@
return pht('Retrieve the patches to apply for a given set of files.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'path' => 'required string',
'state' => 'required dict<string, string>',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_BAD_FRAGMENT' => 'No such fragment exists',
);
diff --git a/src/applications/phragment/conduit/PhragmentQueryFragmentsConduitAPIMethod.php b/src/applications/phragment/conduit/PhragmentQueryFragmentsConduitAPIMethod.php
--- a/src/applications/phragment/conduit/PhragmentQueryFragmentsConduitAPIMethod.php
+++ b/src/applications/phragment/conduit/PhragmentQueryFragmentsConduitAPIMethod.php
@@ -15,17 +15,17 @@
return pht('Query fragments based on their paths.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'paths' => 'required list<string>',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_BAD_FRAGMENT' => 'No such fragment exists',
);
diff --git a/src/applications/phrequent/conduit/PhrequentPopConduitAPIMethod.php b/src/applications/phrequent/conduit/PhrequentPopConduitAPIMethod.php
--- a/src/applications/phrequent/conduit/PhrequentPopConduitAPIMethod.php
+++ b/src/applications/phrequent/conduit/PhrequentPopConduitAPIMethod.php
@@ -14,7 +14,7 @@
return self::METHOD_STATUS_UNSTABLE;
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'objectPHID' => 'phid',
'stopTime' => 'int',
@@ -22,15 +22,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'phid';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$user = $request->getUser();
$object_phid = $request->getValue('objectPHID');
diff --git a/src/applications/phrequent/conduit/PhrequentPushConduitAPIMethod.php b/src/applications/phrequent/conduit/PhrequentPushConduitAPIMethod.php
--- a/src/applications/phrequent/conduit/PhrequentPushConduitAPIMethod.php
+++ b/src/applications/phrequent/conduit/PhrequentPushConduitAPIMethod.php
@@ -16,22 +16,17 @@
return self::METHOD_STATUS_UNSTABLE;
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'objectPHID' => 'required phid',
'startTime' => 'int',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'phid';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$user = $request->getUser();
$object_phid = $request->getValue('objectPHID');
diff --git a/src/applications/phrequent/conduit/PhrequentTrackingConduitAPIMethod.php b/src/applications/phrequent/conduit/PhrequentTrackingConduitAPIMethod.php
--- a/src/applications/phrequent/conduit/PhrequentTrackingConduitAPIMethod.php
+++ b/src/applications/phrequent/conduit/PhrequentTrackingConduitAPIMethod.php
@@ -16,19 +16,14 @@
return self::METHOD_STATUS_UNSTABLE;
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array();
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'array';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$user = $request->getUser();
diff --git a/src/applications/phriction/conduit/PhrictionCreateConduitAPIMethod.php b/src/applications/phriction/conduit/PhrictionCreateConduitAPIMethod.php
--- a/src/applications/phriction/conduit/PhrictionCreateConduitAPIMethod.php
+++ b/src/applications/phriction/conduit/PhrictionCreateConduitAPIMethod.php
@@ -1,13 +1,16 @@
<?php
final class PhrictionCreateConduitAPIMethod extends PhrictionConduitAPIMethod {
+
public function getAPIMethodName() {
return 'phriction.create';
}
+
public function getMethodDescription() {
return pht('Create a Phriction document.');
}
- public function defineParamTypes() {
+
+ protected function defineParamTypes() {
return array(
'slug' => 'required string',
'title' => 'required string',
@@ -15,13 +18,11 @@
'description' => 'optional string',
);
}
- public function defineReturnType() {
+
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
- return array(
- );
- }
+
protected function execute(ConduitAPIRequest $request) {
$slug = $request->getValue('slug');
if (!strlen($slug)) {
diff --git a/src/applications/phriction/conduit/PhrictionEditConduitAPIMethod.php b/src/applications/phriction/conduit/PhrictionEditConduitAPIMethod.php
--- a/src/applications/phriction/conduit/PhrictionEditConduitAPIMethod.php
+++ b/src/applications/phriction/conduit/PhrictionEditConduitAPIMethod.php
@@ -10,7 +10,7 @@
return pht('Update a Phriction document.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'slug' => 'required string',
'title' => 'optional string',
@@ -19,15 +19,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$slug = $request->getValue('slug');
diff --git a/src/applications/phriction/conduit/PhrictionHistoryConduitAPIMethod.php b/src/applications/phriction/conduit/PhrictionHistoryConduitAPIMethod.php
--- a/src/applications/phriction/conduit/PhrictionHistoryConduitAPIMethod.php
+++ b/src/applications/phriction/conduit/PhrictionHistoryConduitAPIMethod.php
@@ -10,17 +10,17 @@
return pht('Retrieve history about a Phriction document.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'slug' => 'required string',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty list';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-BAD-DOCUMENT' => 'No such document exists.',
);
diff --git a/src/applications/phriction/conduit/PhrictionInfoConduitAPIMethod.php b/src/applications/phriction/conduit/PhrictionInfoConduitAPIMethod.php
--- a/src/applications/phriction/conduit/PhrictionInfoConduitAPIMethod.php
+++ b/src/applications/phriction/conduit/PhrictionInfoConduitAPIMethod.php
@@ -10,17 +10,17 @@
return pht('Retrieve information about a Phriction document.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'slug' => 'required string',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-BAD-DOCUMENT' => 'No such document exists.',
);
diff --git a/src/applications/project/conduit/ProjectCreateConduitAPIMethod.php b/src/applications/project/conduit/ProjectCreateConduitAPIMethod.php
--- a/src/applications/project/conduit/ProjectCreateConduitAPIMethod.php
+++ b/src/applications/project/conduit/ProjectCreateConduitAPIMethod.php
@@ -10,21 +10,17 @@
return pht('Create a project.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'name' => 'required string',
'members' => 'optional list<phid>',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'dict';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$user = $request->getUser();
diff --git a/src/applications/project/conduit/ProjectQueryConduitAPIMethod.php b/src/applications/project/conduit/ProjectQueryConduitAPIMethod.php
--- a/src/applications/project/conduit/ProjectQueryConduitAPIMethod.php
+++ b/src/applications/project/conduit/ProjectQueryConduitAPIMethod.php
@@ -10,7 +10,7 @@
return 'Execute searches for Projects.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
$statuses = array(
PhabricatorProjectQuery::STATUS_ANY,
@@ -36,14 +36,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$query = new PhabricatorProjectQuery();
$query->setViewer($request->getUser());
diff --git a/src/applications/releeph/conduit/ReleephGetBranchesConduitAPIMethod.php b/src/applications/releeph/conduit/ReleephGetBranchesConduitAPIMethod.php
--- a/src/applications/releeph/conduit/ReleephGetBranchesConduitAPIMethod.php
+++ b/src/applications/releeph/conduit/ReleephGetBranchesConduitAPIMethod.php
@@ -10,20 +10,15 @@
return 'Return information about all active Releeph branches.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty list<dict<string, wild>>';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$results = array();
diff --git a/src/applications/releeph/conduit/ReleephProjectInfoConduitAPIMethod.php b/src/applications/releeph/conduit/ReleephProjectInfoConduitAPIMethod.php
--- a/src/applications/releeph/conduit/ReleephProjectInfoConduitAPIMethod.php
+++ b/src/applications/releeph/conduit/ReleephProjectInfoConduitAPIMethod.php
@@ -12,17 +12,17 @@
'for a given Arcanist project.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'arcProjectName' => 'optional string',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'dict<string, wild>';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_UNKNOWN_ARC' =>
"The given Arcanist project name doesn't exist in the ".
diff --git a/src/applications/releeph/conduit/ReleephQueryBranchesConduitAPIMethod.php b/src/applications/releeph/conduit/ReleephQueryBranchesConduitAPIMethod.php
--- a/src/applications/releeph/conduit/ReleephQueryBranchesConduitAPIMethod.php
+++ b/src/applications/releeph/conduit/ReleephQueryBranchesConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Query information about Releeph branches.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'ids' => 'optional list<id>',
'phids' => 'optional list<phid>',
@@ -19,14 +19,10 @@
) + $this->getPagerParamTypes();
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'query-results';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
diff --git a/src/applications/releeph/conduit/ReleephQueryProductsConduitAPIMethod.php b/src/applications/releeph/conduit/ReleephQueryProductsConduitAPIMethod.php
--- a/src/applications/releeph/conduit/ReleephQueryProductsConduitAPIMethod.php
+++ b/src/applications/releeph/conduit/ReleephQueryProductsConduitAPIMethod.php
@@ -11,7 +11,7 @@
return pht('Query information about Releeph products.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'ids' => 'optional list<id>',
'phids' => 'optional list<phid>',
@@ -20,14 +20,10 @@
) + $this->getPagerParamTypes();
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'query-results';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
diff --git a/src/applications/releeph/conduit/ReleephQueryRequestsConduitAPIMethod.php b/src/applications/releeph/conduit/ReleephQueryRequestsConduitAPIMethod.php
--- a/src/applications/releeph/conduit/ReleephQueryRequestsConduitAPIMethod.php
+++ b/src/applications/releeph/conduit/ReleephQueryRequestsConduitAPIMethod.php
@@ -12,21 +12,17 @@
'Return information about all Releeph requests linked to the given ids.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'revisionPHIDs' => 'optional list<phid>',
'requestedCommitPHIDs' => 'optional list<phid>',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'dict<string, wild>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $conduit_request) {
$revision_phids = $conduit_request->getValue('revisionPHIDs');
$requested_commit_phids =
diff --git a/src/applications/releeph/conduit/ReleephRequestConduitAPIMethod.php b/src/applications/releeph/conduit/ReleephRequestConduitAPIMethod.php
--- a/src/applications/releeph/conduit/ReleephRequestConduitAPIMethod.php
+++ b/src/applications/releeph/conduit/ReleephRequestConduitAPIMethod.php
@@ -10,7 +10,7 @@
return 'Request a commit or diff to be picked to a branch.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'branchPHID' => 'required string',
'things' => 'required list<string>',
@@ -18,11 +18,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'dict<string, wild>';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_BRANCH' => 'Unknown Releeph branch.',
'ERR_FIELD_PARSE' => 'Unable to parse a Releeph field.',
diff --git a/src/applications/releeph/conduit/work/ReleephWorkCanPushConduitAPIMethod.php b/src/applications/releeph/conduit/work/ReleephWorkCanPushConduitAPIMethod.php
--- a/src/applications/releeph/conduit/work/ReleephWorkCanPushConduitAPIMethod.php
+++ b/src/applications/releeph/conduit/work/ReleephWorkCanPushConduitAPIMethod.php
@@ -14,20 +14,16 @@
return 'Return whether the conduit user is allowed to push.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'projectPHID' => 'required string',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'bool';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$releeph_project = id(new ReleephProject())
->loadOneWhere('phid = %s', $request->getValue('projectPHID'));
diff --git a/src/applications/releeph/conduit/work/ReleephWorkGetAuthorInfoConduitAPIMethod.php b/src/applications/releeph/conduit/work/ReleephWorkGetAuthorInfoConduitAPIMethod.php
--- a/src/applications/releeph/conduit/work/ReleephWorkGetAuthorInfoConduitAPIMethod.php
+++ b/src/applications/releeph/conduit/work/ReleephWorkGetAuthorInfoConduitAPIMethod.php
@@ -15,21 +15,17 @@
return 'Return a string to use as the VCS author.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'userPHID' => 'required string',
'vcsType' => 'required string',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty string';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$user = id(new PhabricatorUser())
->loadOneWhere('phid = %s', $request->getValue('userPHID'));
diff --git a/src/applications/releeph/conduit/work/ReleephWorkGetBranchCommitMessageConduitAPIMethod.php b/src/applications/releeph/conduit/work/ReleephWorkGetBranchCommitMessageConduitAPIMethod.php
--- a/src/applications/releeph/conduit/work/ReleephWorkGetBranchCommitMessageConduitAPIMethod.php
+++ b/src/applications/releeph/conduit/work/ReleephWorkGetBranchCommitMessageConduitAPIMethod.php
@@ -15,20 +15,16 @@
return 'Get a commit message for committing a Releeph branch.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'branchPHID' => 'required string',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty string';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
diff --git a/src/applications/releeph/conduit/work/ReleephWorkGetBranchConduitAPIMethod.php b/src/applications/releeph/conduit/work/ReleephWorkGetBranchConduitAPIMethod.php
--- a/src/applications/releeph/conduit/work/ReleephWorkGetBranchConduitAPIMethod.php
+++ b/src/applications/releeph/conduit/work/ReleephWorkGetBranchConduitAPIMethod.php
@@ -15,20 +15,16 @@
return 'Return information to help checkout / cut a Releeph branch.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'branchPHID' => 'required string',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'dict<string, wild>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$branch = id(new ReleephBranchQuery())
->setViewer($request->getUser())
diff --git a/src/applications/releeph/conduit/work/ReleephWorkGetCommitMessageConduitAPIMethod.php b/src/applications/releeph/conduit/work/ReleephWorkGetCommitMessageConduitAPIMethod.php
--- a/src/applications/releeph/conduit/work/ReleephWorkGetCommitMessageConduitAPIMethod.php
+++ b/src/applications/releeph/conduit/work/ReleephWorkGetCommitMessageConduitAPIMethod.php
@@ -17,7 +17,7 @@
'a ReleephRequest commit message.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
$action_const = $this->formatStringConstants(array('pick', 'revert'));
return array(
@@ -26,14 +26,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'dict<string, string>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$viewer = $request->getUser();
diff --git a/src/applications/releeph/conduit/work/ReleephWorkNextRequestConduitAPIMethod.php b/src/applications/releeph/conduit/work/ReleephWorkNextRequestConduitAPIMethod.php
--- a/src/applications/releeph/conduit/work/ReleephWorkNextRequestConduitAPIMethod.php
+++ b/src/applications/releeph/conduit/work/ReleephWorkNextRequestConduitAPIMethod.php
@@ -20,18 +20,18 @@
'and pick and revert ReleephRequests';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'branchPHID' => 'required phid',
'seen' => 'required map<string, bool>',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return '';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-NOT-PUSHER' =>
'You are not listed as a pusher for thie Releeph project!',
diff --git a/src/applications/releeph/conduit/work/ReleephWorkRecordConduitAPIMethod.php b/src/applications/releeph/conduit/work/ReleephWorkRecordConduitAPIMethod.php
--- a/src/applications/releeph/conduit/work/ReleephWorkRecordConduitAPIMethod.php
+++ b/src/applications/releeph/conduit/work/ReleephWorkRecordConduitAPIMethod.php
@@ -29,7 +29,7 @@
'to the upstream repository.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
$action_const = $this->formatStringConstants(
array(
'pick',
@@ -43,14 +43,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'void';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$action = $request->getValue('action');
$new_commit_id = $request->getValue('commitIdentifier');
diff --git a/src/applications/releeph/conduit/work/ReleephWorkRecordPickStatusConduitAPIMethod.php b/src/applications/releeph/conduit/work/ReleephWorkRecordPickStatusConduitAPIMethod.php
--- a/src/applications/releeph/conduit/work/ReleephWorkRecordPickStatusConduitAPIMethod.php
+++ b/src/applications/releeph/conduit/work/ReleephWorkRecordPickStatusConduitAPIMethod.php
@@ -15,7 +15,7 @@
return 'Record whether a pick or revert was successful or not.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
$action_const = $this->formatStringConstants(
array(
'pick',
@@ -31,14 +31,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return '';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$action = $request->getValue('action');
$ok = $request->getValue('ok');
diff --git a/src/applications/remarkup/conduit/RemarkupProcessConduitAPIMethod.php b/src/applications/remarkup/conduit/RemarkupProcessConduitAPIMethod.php
--- a/src/applications/remarkup/conduit/RemarkupProcessConduitAPIMethod.php
+++ b/src/applications/remarkup/conduit/RemarkupProcessConduitAPIMethod.php
@@ -14,18 +14,18 @@
return 'Process text through remarkup in phabricator context.';
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-NO-CONTENT' => 'Content may not be empty.',
'ERR-INVALID-ENGINE' => 'Invalid markup engine.',
);
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
$available_contexts = array_keys($this->getEngineContexts());
$available_const = $this->formatStringConstants($available_contexts);
diff --git a/src/applications/repository/conduit/RepositoryCreateConduitAPIMethod.php b/src/applications/repository/conduit/RepositoryCreateConduitAPIMethod.php
--- a/src/applications/repository/conduit/RepositoryCreateConduitAPIMethod.php
+++ b/src/applications/repository/conduit/RepositoryCreateConduitAPIMethod.php
@@ -19,7 +19,7 @@
return pht('Create a new repository.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
$vcs_const = $this->formatStringConstants(array('git', 'hg', 'svn'));
return array(
@@ -42,11 +42,11 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR-DUPLICATE' =>
'Duplicate repository callsign.',
diff --git a/src/applications/repository/conduit/RepositoryQueryConduitAPIMethod.php b/src/applications/repository/conduit/RepositoryQueryConduitAPIMethod.php
--- a/src/applications/repository/conduit/RepositoryQueryConduitAPIMethod.php
+++ b/src/applications/repository/conduit/RepositoryQueryConduitAPIMethod.php
@@ -19,7 +19,7 @@
return pht('Query repositories.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'ids' => 'optional list<int>',
'phids' => 'optional list<phid>',
@@ -30,15 +30,10 @@
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<dict>';
}
- public function defineErrorTypes() {
- return array(
- );
- }
-
protected function execute(ConduitAPIRequest $request) {
$query = id(new PhabricatorRepositoryQuery())
->setViewer($request->getUser());
diff --git a/src/applications/slowvote/conduit/SlowvoteInfoConduitAPIMethod.php b/src/applications/slowvote/conduit/SlowvoteInfoConduitAPIMethod.php
--- a/src/applications/slowvote/conduit/SlowvoteInfoConduitAPIMethod.php
+++ b/src/applications/slowvote/conduit/SlowvoteInfoConduitAPIMethod.php
@@ -10,17 +10,17 @@
return 'Retrieve an array of information about a poll.';
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'poll_id' => 'required id',
);
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'nonempty dict';
}
- public function defineErrorTypes() {
+ protected function defineErrorTypes() {
return array(
'ERR_BAD_POLL' => 'No such poll exists',
);
diff --git a/src/applications/tokens/conduit/TokenGiveConduitAPIMethod.php b/src/applications/tokens/conduit/TokenGiveConduitAPIMethod.php
--- a/src/applications/tokens/conduit/TokenGiveConduitAPIMethod.php
+++ b/src/applications/tokens/conduit/TokenGiveConduitAPIMethod.php
@@ -10,18 +10,14 @@
return pht('Give or change a token.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'tokenPHID' => 'phid|null',
'objectPHID' => 'phid',
);
}
- public function defineErrorTypes() {
- return array();
- }
-
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'void';
}
diff --git a/src/applications/tokens/conduit/TokenGivenConduitAPIMethod.php b/src/applications/tokens/conduit/TokenGivenConduitAPIMethod.php
--- a/src/applications/tokens/conduit/TokenGivenConduitAPIMethod.php
+++ b/src/applications/tokens/conduit/TokenGivenConduitAPIMethod.php
@@ -10,7 +10,7 @@
return pht('Query tokens given to objects.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array(
'authorPHIDs' => 'list<phid>',
'objectPHIDs' => 'list<phid>',
@@ -18,11 +18,7 @@
);
}
- public function defineErrorTypes() {
- return array();
- }
-
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<dict>';
}
diff --git a/src/applications/tokens/conduit/TokenQueryConduitAPIMethod.php b/src/applications/tokens/conduit/TokenQueryConduitAPIMethod.php
--- a/src/applications/tokens/conduit/TokenQueryConduitAPIMethod.php
+++ b/src/applications/tokens/conduit/TokenQueryConduitAPIMethod.php
@@ -10,18 +10,14 @@
return pht('Query tokens.');
}
- public function defineParamTypes() {
+ protected function defineParamTypes() {
return array();
}
- public function defineReturnType() {
+ protected function defineReturnType() {
return 'list<dict>';
}
- public function defineErrorTypes() {
- return array();
- }
-
protected function execute(ConduitAPIRequest $request) {
$query = id(new PhabricatorTokenQuery())
->setViewer($request->getUser());
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 18, 9:01 AM (13 h, 41 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7000847
Default Alt Text
D12380.largetrue.diff (118 KB)
Attached To
Mode
D12380: Give Conduit params/return/errors protected visibility
Attached
Detach File
Event Timeline
Log In to Comment