1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 03:12:41 +01:00
phorge-phorge/src/applications/differential/constants/DifferentialRevisionStatus.php

29 lines
903 B
PHP
Raw Normal View History

<?php
/**
* NOTE: you probably want {@class:ArcanistDifferentialRevisionStatus}.
* This class just contains a mapping for color within the Differential
* application.
*/
final class DifferentialRevisionStatus {
public static function getRevisionStatusTagColor($status) {
$default = PhabricatorTagView::COLOR_GREY;
$map = array(
ArcanistDifferentialRevisionStatus::NEEDS_REVIEW =>
PhabricatorTagView::COLOR_ORANGE,
ArcanistDifferentialRevisionStatus::NEEDS_REVISION =>
PhabricatorTagView::COLOR_RED,
ArcanistDifferentialRevisionStatus::ACCEPTED =>
PhabricatorTagView::COLOR_GREEN,
ArcanistDifferentialRevisionStatus::CLOSED =>
PhabricatorTagView::COLOR_BLUE,
ArcanistDifferentialRevisionStatus::ABANDONED =>
PhabricatorTagView::COLOR_BLACK,
);
return idx($map, $status, $default);
}
}