Differential D15362 Diff 37050 src/applications/harbormaster/storage/build/HarbormasterBuildUnitMessage.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/storage/build/HarbormasterBuildUnitMessage.php
Show First 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | final class HarbormasterBuildUnitMessage | ||||
} | } | ||||
public function setProperty($key, $value) { | public function setProperty($key, $value) { | ||||
$this->properties[$key] = $value; | $this->properties[$key] = $value; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getSortKey() { | public function getSortKey() { | ||||
// TODO: Maybe use more numeric values after T6861. | $status = $this->getResult(); | ||||
$map = array( | $sort = HarbormasterUnitStatus::getUnitStatusSort($status); | ||||
ArcanistUnitTestResult::RESULT_FAIL => 'A', | |||||
ArcanistUnitTestResult::RESULT_BROKEN => 'B', | |||||
ArcanistUnitTestResult::RESULT_UNSOUND => 'C', | |||||
ArcanistUnitTestResult::RESULT_PASS => 'Z', | |||||
); | |||||
$result = idx($map, $this->getResult(), 'N'); | |||||
$parts = array( | $parts = array( | ||||
$result, | $sort, | ||||
$this->getEngine(), | $this->getEngine(), | ||||
$this->getNamespace(), | $this->getNamespace(), | ||||
$this->getName(), | $this->getName(), | ||||
$this->getID(), | $this->getID(), | ||||
); | ); | ||||
return implode("\0", $parts); | return implode("\0", $parts); | ||||
} | } | ||||
} | } |