Changeset View
Changeset View
Standalone View
Standalone View
src/applications/owners/constants/PhabricatorOwnersAuditRule.php
<?php | <?php | ||||
final class PhabricatorOwnersAuditRule | final class PhabricatorOwnersAuditRule | ||||
extends Phobject { | extends Phobject { | ||||
const AUDITING_NONE = 'none'; | const AUDITING_NONE = 'none'; | ||||
const AUDITING_AUDIT = 'audit'; | const AUDITING_NO_OWNER = 'audit'; | ||||
const AUDITING_UNREVIEWED = 'unreviewed'; | |||||
const AUDITING_NO_OWNER_AND_UNREVIEWED = 'uninvolved-unreviewed'; | |||||
const AUDITING_ALL = 'all'; | |||||
private $key; | private $key; | ||||
private $spec; | private $spec; | ||||
public static function newFromState($key) { | public static function newFromState($key) { | ||||
$specs = self::newSpecifications(); | $specs = self::newSpecifications(); | ||||
$spec = idx($specs, $key, array()); | $spec = idx($specs, $key, array()); | ||||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | return array( | ||||
self::AUDITING_NONE => array( | self::AUDITING_NONE => array( | ||||
'name' => pht('No Auditing'), | 'name' => pht('No Auditing'), | ||||
'icon.icon' => 'fa-ban', | 'icon.icon' => 'fa-ban', | ||||
'deprecated' => array( | 'deprecated' => array( | ||||
'' => pht('"" (empty string)'), | '' => pht('"" (empty string)'), | ||||
'0' => '"0"', | '0' => '"0"', | ||||
), | ), | ||||
), | ), | ||||
self::AUDITING_AUDIT => array( | self::AUDITING_UNREVIEWED => array( | ||||
'name' => pht('Audit Commits'), | 'name' => pht('Audit Unreviewed Commits'), | ||||
'icon.icon' => 'fa-check', | |||||
), | |||||
self::AUDITING_NO_OWNER => array( | |||||
'name' => pht('Audit Commits With No Owner Involvement'), | |||||
'icon.icon' => 'fa-check', | 'icon.icon' => 'fa-check', | ||||
'deprecated' => array( | 'deprecated' => array( | ||||
'1' => '"1"', | '1' => '"1"', | ||||
), | ), | ||||
), | ), | ||||
self::AUDITING_NO_OWNER_AND_UNREVIEWED => array( | |||||
'name' => pht( | |||||
epriestley: (Oops, I also misspelled "Unreviewed" here.) | |||||
'Audit Unreviewed Commits and Commits With No Owner Involvement'), | |||||
'icon.icon' => 'fa-check', | |||||
), | |||||
self::AUDITING_ALL => array( | |||||
Not Done Inline Actions"Audit Commits With" Also this is mostly an "English is stupid" thing, but it's weird that the constant is named AUDITING_NO_OWNER_OR_UNREVIEWED but the string says "Involvement and Unreviewed". amckinley: "Audit Commits With"
Also this is mostly an "English is stupid" thing, but it's weird that the… | |||||
'name' => pht('Audit All Commits'), | |||||
'icon.icon' => 'fa-check', | |||||
), | |||||
Not Done Inline ActionsLooks like you accidentally stripped the rest of the spec from this option. amckinley: Looks like you accidentally stripped the rest of the spec from this option. | |||||
); | ); | ||||
} | } | ||||
} | } |
(Oops, I also misspelled "Unreviewed" here.)