Differential D14073 Diff 34742 src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/conduit/HarbormasterSendMessageConduitAPIMethod.php
| Show All 31 Lines | public function getMethodDescription() { | ||||
| $message_table = implode("\n", $rows); | $message_table = implode("\n", $rows); | ||||
| $rows = array(); | $rows = array(); | ||||
| $rows[] = "| {$head_key} | {$head_type} | {$head_desc} |"; | $rows[] = "| {$head_key} | {$head_type} | {$head_desc} |"; | ||||
| $rows[] = '|-------------|--------------|--------------|'; | $rows[] = '|-------------|--------------|--------------|'; | ||||
| $unit_spec = HarbormasterBuildUnitMessage::getParameterSpec(); | $unit_spec = HarbormasterBuildUnitMessage::getParameterSpec(); | ||||
| foreach ($unit_spec as $key => $parameter) { | foreach ($unit_spec as $key => $parameter) { | ||||
| $type = idx($parameter, 'type'); | $type = idx($parameter, 'type'); | ||||
| $type = str_replace('|', pht(' or '), $type); | $type = str_replace('|', ' '.pht('or').' ', $type); | ||||
| $description = idx($parameter, 'description'); | $description = idx($parameter, 'description'); | ||||
| $rows[] = "| `{$key}` | //{$type}// | {$description} |"; | $rows[] = "| `{$key}` | //{$type}// | {$description} |"; | ||||
| } | } | ||||
| $unit_table = implode("\n", $rows); | $unit_table = implode("\n", $rows); | ||||
| $rows = array(); | $rows = array(); | ||||
| $rows[] = "| {$head_key} | {$head_name} | {$head_desc} |"; | $rows[] = "| {$head_key} | {$head_name} | {$head_desc} |"; | ||||
| $rows[] = '|-------------|--------------|--------------|'; | $rows[] = '|-------------|--------------|--------------|'; | ||||
| $results = ArcanistUnitTestResult::getAllResultCodes(); | $results = ArcanistUnitTestResult::getAllResultCodes(); | ||||
| foreach ($results as $result_code) { | foreach ($results as $result_code) { | ||||
| $name = ArcanistUnitTestResult::getResultCodeName($result_code); | $name = ArcanistUnitTestResult::getResultCodeName($result_code); | ||||
| $description = ArcanistUnitTestResult::getResultCodeDescription( | $description = ArcanistUnitTestResult::getResultCodeDescription( | ||||
| $result_code); | $result_code); | ||||
| $rows[] = "| `{$result_code}` | **{$name}** | {$description} |"; | $rows[] = "| `{$result_code}` | **{$name}** | {$description} |"; | ||||
| } | } | ||||
| $result_table = implode("\n", $rows); | $result_table = implode("\n", $rows); | ||||
| $rows = array(); | $rows = array(); | ||||
| $rows[] = "| {$head_key} | {$head_type} | {$head_desc} |"; | $rows[] = "| {$head_key} | {$head_type} | {$head_desc} |"; | ||||
| $rows[] = '|-------------|--------------|--------------|'; | $rows[] = '|-------------|--------------|--------------|'; | ||||
| $lint_spec = HarbormasterBuildLintMessage::getParameterSpec(); | $lint_spec = HarbormasterBuildLintMessage::getParameterSpec(); | ||||
| foreach ($lint_spec as $key => $parameter) { | foreach ($lint_spec as $key => $parameter) { | ||||
| $type = idx($parameter, 'type'); | $type = idx($parameter, 'type'); | ||||
| $type = str_replace('|', pht(' or '), $type); | $type = str_replace('|', ' '.pht('or').' ', $type); | ||||
| $description = idx($parameter, 'description'); | $description = idx($parameter, 'description'); | ||||
| $rows[] = "| `{$key}` | //{$type}// | {$description} |"; | $rows[] = "| `{$key}` | //{$type}// | {$description} |"; | ||||
| } | } | ||||
| $lint_table = implode("\n", $rows); | $lint_table = implode("\n", $rows); | ||||
| $rows = array(); | $rows = array(); | ||||
| $rows[] = "| {$head_key} | {$head_name} |"; | $rows[] = "| {$head_key} | {$head_name} |"; | ||||
| $rows[] = '|-------------|--------------|'; | $rows[] = '|-------------|--------------|'; | ||||
| ▲ Show 20 Lines • Show All 196 Lines • Show Last 20 Lines | |||||