Differential D9991 Diff 24151 src/applications/differential/conduit/DifferentialParseCommitMessageConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/conduit/DifferentialParseCommitMessageConduitAPIMethod.php
- This file was moved from src/applications/differential/conduit/ConduitAPI_differential_parsecommitmessage_Method.php.
| <?php | <?php | ||||
| final class ConduitAPI_differential_parsecommitmessage_Method | final class DifferentialParseCommitMessageConduitAPIMethod | ||||
| extends ConduitAPI_differential_Method { | extends DifferentialConduitAPIMethod { | ||||
| private $errors; | private $errors; | ||||
| public function getAPIMethodName() { | |||||
| return 'differential.parsecommitmessage'; | |||||
| } | |||||
| public function getMethodDescription() { | public function getMethodDescription() { | ||||
| return pht('Parse commit messages for Differential fields.'); | return pht('Parse commit messages for Differential fields.'); | ||||
| } | } | ||||
| public function defineParamTypes() { | public function defineParamTypes() { | ||||
| return array( | return array( | ||||
| 'corpus' => 'required string', | 'corpus' => 'required string', | ||||
| 'partial' => 'optional bool', | 'partial' => 'optional bool', | ||||
| ▲ Show 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | private function parseCommitMessage($corpus, array $label_map) { | ||||
| foreach ($parser->getErrors() as $error) { | foreach ($parser->getErrors() as $error) { | ||||
| $this->errors[] = $error; | $this->errors[] = $error; | ||||
| } | } | ||||
| return $result; | return $result; | ||||
| } | } | ||||
| } | } | ||||