Differential D17113 Diff 41170 src/applications/differential/constants/DifferentialReviewerStatus.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/constants/DifferentialReviewerStatus.php
| <?php | <?php | ||||
| final class DifferentialReviewerStatus extends Phobject { | final class DifferentialReviewerStatus extends Phobject { | ||||
| const STATUS_BLOCKING = 'blocking'; | const STATUS_BLOCKING = 'blocking'; | ||||
| const STATUS_ADDED = 'added'; | const STATUS_ADDED = 'added'; | ||||
| const STATUS_ACCEPTED = 'accepted'; | const STATUS_ACCEPTED = 'accepted'; | ||||
| const STATUS_REJECTED = 'rejected'; | const STATUS_REJECTED = 'rejected'; | ||||
| const STATUS_COMMENTED = 'commented'; | const STATUS_COMMENTED = 'commented'; | ||||
| const STATUS_ACCEPTED_OLDER = 'accepted-older'; | const STATUS_ACCEPTED_OLDER = 'accepted-older'; | ||||
| const STATUS_REJECTED_OLDER = 'rejected-older'; | const STATUS_REJECTED_OLDER = 'rejected-older'; | ||||
| const STATUS_RESIGNED = 'resigned'; | |||||
| /** | /** | ||||
| * Returns the relative strength of a status, used to pick a winner when a | * Returns the relative strength of a status, used to pick a winner when a | ||||
| * transaction group makes several status changes to a particular reviewer. | * transaction group makes several status changes to a particular reviewer. | ||||
| * | * | ||||
| * For example, if you accept a revision and leave a comment, the transactions | * For example, if you accept a revision and leave a comment, the transactions | ||||
| * will attempt to update you to both "commented" and "accepted". We want | * will attempt to update you to both "commented" and "accepted". We want | ||||
| * "accepted" to win, because it's the stronger of the two. | * "accepted" to win, because it's the stronger of the two. | ||||
| Show All 9 Lines | $map = array( | ||||
| self::STATUS_BLOCKING => 3, | self::STATUS_BLOCKING => 3, | ||||
| self::STATUS_ACCEPTED_OLDER => 4, | self::STATUS_ACCEPTED_OLDER => 4, | ||||
| self::STATUS_REJECTED_OLDER => 4, | self::STATUS_REJECTED_OLDER => 4, | ||||
| self::STATUS_ACCEPTED => 5, | self::STATUS_ACCEPTED => 5, | ||||
| self::STATUS_REJECTED => 5, | self::STATUS_REJECTED => 5, | ||||
| self::STATUS_RESIGNED => 5, | |||||
| ); | ); | ||||
| return idx($map, $constant, 0); | return idx($map, $constant, 0); | ||||
| } | } | ||||
| } | } | ||||