Differential D12380 Diff 29771 src/applications/diffusion/conduit/DiffusionGetLintMessagesConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/conduit/DiffusionGetLintMessagesConduitAPIMethod.php
Show All 9 Lines | final class DiffusionGetLintMessagesConduitAPIMethod | ||||
public function getMethodStatus() { | public function getMethodStatus() { | ||||
return self::METHOD_STATUS_UNSTABLE; | return self::METHOD_STATUS_UNSTABLE; | ||||
} | } | ||||
public function getMethodDescription() { | public function getMethodDescription() { | ||||
return 'Get lint messages for existing code.'; | return 'Get lint messages for existing code.'; | ||||
} | } | ||||
public function defineParamTypes() { | protected function defineParamTypes() { | ||||
return array( | return array( | ||||
'arcanistProject' => 'required string', | 'arcanistProject' => 'required string', | ||||
'branch' => 'optional string', | 'branch' => 'optional string', | ||||
'commit' => 'optional string', | 'commit' => 'optional string', | ||||
'files' => 'required list<string>', | 'files' => 'required list<string>', | ||||
); | ); | ||||
} | } | ||||
public function defineReturnType() { | protected function defineReturnType() { | ||||
return 'list<dict>'; | return 'list<dict>'; | ||||
} | } | ||||
public function defineErrorTypes() { | |||||
return array(); | |||||
} | |||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
$project = id(new PhabricatorRepositoryArcanistProject())->loadOneWhere( | $project = id(new PhabricatorRepositoryArcanistProject())->loadOneWhere( | ||||
'name = %s', | 'name = %s', | ||||
$request->getValue('arcanistProject')); | $request->getValue('arcanistProject')); | ||||
if (!$project || !$project->getRepositoryID()) { | if (!$project || !$project->getRepositoryID()) { | ||||
return array(); | return array(); | ||||
} | } | ||||
Show All 31 Lines |