@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Give Conduit params/return/errors protected visibility

Summary:
Ref T7803. Ref T5873. I want to drive Conduit through more shared infrastructure, but can't currently add parameters automatically.

Put a `getX()` around the `defineX()` methods so the parent can provide default behaviors.

Also like 60% of methods don't define any special error types; don't require them to implement this method. I want to move away from this in general.

Test Plan:
- Ran `arc unit --everything`.
- Called `conduit.query`.
- Browsed Conduit UI.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: hach-que, epriestley

Maniphest Tasks: T5873, T7803

Differential Revision: https://secure.phabricator.com/D12380

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