Changeset View
Changeset View
Standalone View
Standalone View
src/parser/diff/ArcanistDiffChangeType.php
| Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Lines | final class ArcanistDiffChangeType { | ||||
| public static function isModifyChangeType($type) { | public static function isModifyChangeType($type) { | ||||
| static $types = array( | static $types = array( | ||||
| self::TYPE_CHANGE => true, | self::TYPE_CHANGE => true, | ||||
| ); | ); | ||||
| return isset($types[$type]); | return isset($types[$type]); | ||||
| } | } | ||||
| public static function getFullNameForChangeType($type) { | public static function getFullNameForChangeType($type) { | ||||
| static $types = array( | static $types = null; | ||||
| self::TYPE_ADD => 'Added', | |||||
| self::TYPE_CHANGE => 'Modified', | if ($types === null) { | ||||
| self::TYPE_DELETE => 'Deleted', | $types = array( | ||||
| self::TYPE_MOVE_AWAY => 'Moved Away', | self::TYPE_ADD => pht('Added'), | ||||
| self::TYPE_COPY_AWAY => 'Copied Away', | self::TYPE_CHANGE => pht('Modified'), | ||||
| self::TYPE_MOVE_HERE => 'Moved Here', | self::TYPE_DELETE => pht('Deleted'), | ||||
| self::TYPE_COPY_HERE => 'Copied Here', | self::TYPE_MOVE_AWAY => pht('Moved Away'), | ||||
| self::TYPE_MULTICOPY => 'Deleted After Multiple Copy', | self::TYPE_COPY_AWAY => pht('Copied Away'), | ||||
| self::TYPE_MESSAGE => 'Commit Message', | self::TYPE_MOVE_HERE => pht('Moved Here'), | ||||
| self::TYPE_CHILD => 'Contents Modified', | self::TYPE_COPY_HERE => pht('Copied Here'), | ||||
| self::TYPE_MULTICOPY => pht('Deleted After Multiple Copy'), | |||||
| self::TYPE_MESSAGE => pht('Commit Message'), | |||||
| self::TYPE_CHILD => pht('Contents Modified'), | |||||
| ); | ); | ||||
| return idx($types, coalesce($type, '?'), 'Unknown'); | } | ||||
| return idx($types, coalesce($type, '?'), pht('Unknown')); | |||||
| } | } | ||||
| } | } | ||||