Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / maniphest / conduit / ManiphestStatusSearchConduitAPIMethod.php
blob7185cde96f8428acbd2fd26e092e31c74ac9ccf0
1 <?php
3 final class ManiphestStatusSearchConduitAPIMethod
4 extends ManiphestConduitAPIMethod {
6 public function getAPIMethodName() {
7 return 'maniphest.status.search';
10 public function getMethodSummary() {
11 return pht('Read information about task statuses.');
14 public function getMethodDescription() {
15 return pht(
16 'Returns information about the possible statuses for Maniphest '.
17 'tasks.');
20 protected function defineParamTypes() {
21 return array();
24 protected function defineReturnType() {
25 return 'map<string, wild>';
28 public function getRequiredScope() {
29 return self::SCOPE_ALWAYS;
32 protected function execute(ConduitAPIRequest $request) {
33 $config = PhabricatorEnv::getEnvConfig('maniphest.statuses');
34 $results = array();
35 foreach ($config as $code => $status) {
36 $stripped_status = array(
37 'name' => $status['name'],
38 'value' => $code,
39 'closed' => !empty($status['closed']),
42 if (isset($status['special'])) {
43 $stripped_status['special'] = $status['special'];
46 $results[] = $stripped_status;
49 return array('data' => $results);