~ubuntu-branches/ubuntu/wily/phabricator/wily

« back to all changes in this revision

Viewing changes to src/differential/constants/ArcanistDifferentialRevisionStatus.php

  • Committer: Package Import Robot
  • Author(s): Richard Sellam
  • Date: 2014-11-01 23:20:06 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: package-import@ubuntu.com-20141101232006-mvlnp0cil67tsboe
Tags: upstream-0~git20141101/arcanist
Import upstream version 0~git20141101, component arcanist

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
final class ArcanistDifferentialRevisionStatus {
 
4
 
 
5
  const NEEDS_REVIEW      = 0;
 
6
  const NEEDS_REVISION    = 1;
 
7
  const ACCEPTED          = 2;
 
8
  const CLOSED            = 3;
 
9
  const ABANDONED         = 4;
 
10
  const CHANGES_PLANNED   = 5;
 
11
  const IN_PREPARATION    = 6;
 
12
 
 
13
  public static function getNameForRevisionStatus($status) {
 
14
    $map = array(
 
15
      self::NEEDS_REVIEW      => pht('Needs Review'),
 
16
      self::NEEDS_REVISION    => pht('Needs Revision'),
 
17
      self::ACCEPTED          => pht('Accepted'),
 
18
      self::CLOSED            => pht('Closed'),
 
19
      self::ABANDONED         => pht('Abandoned'),
 
20
      self::CHANGES_PLANNED   => pht('Changes Planned'),
 
21
      self::IN_PREPARATION    => pht('In Preparation'),
 
22
    );
 
23
 
 
24
    return idx($map, coalesce($status, '?'), 'Unknown');
 
25
  }
 
26
 
 
27
}