Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/constants/DifferentialChangeType.php
| Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | static $names = array( | ||||
| self::FILE_SYMLINK => 'sym', | self::FILE_SYMLINK => 'sym', | ||||
| self::FILE_SUBMODULE => 'sub', | self::FILE_SUBMODULE => 'sub', | ||||
| ); | ); | ||||
| return idx($names, coalesce($type, '?'), '???'); | return idx($names, coalesce($type, '?'), '???'); | ||||
| } | } | ||||
| public static function isOldLocationChangeType($type) { | public static function isOldLocationChangeType($type) { | ||||
| static $types = array( | static $types = array( | ||||
| DifferentialChangeType::TYPE_MOVE_AWAY => true, | self::TYPE_MOVE_AWAY => true, | ||||
| DifferentialChangeType::TYPE_COPY_AWAY => true, | self::TYPE_COPY_AWAY => true, | ||||
| DifferentialChangeType::TYPE_MULTICOPY => true, | self::TYPE_MULTICOPY => true, | ||||
| ); | ); | ||||
| return isset($types[$type]); | return isset($types[$type]); | ||||
| } | } | ||||
| public static function isNewLocationChangeType($type) { | public static function isNewLocationChangeType($type) { | ||||
| static $types = array( | static $types = array( | ||||
| DifferentialChangeType::TYPE_MOVE_HERE => true, | self::TYPE_MOVE_HERE => true, | ||||
| DifferentialChangeType::TYPE_COPY_HERE => true, | self::TYPE_COPY_HERE => true, | ||||
| ); | ); | ||||
| return isset($types[$type]); | return isset($types[$type]); | ||||
| } | } | ||||
| public static function isDeleteChangeType($type) { | public static function isDeleteChangeType($type) { | ||||
| static $types = array( | static $types = array( | ||||
| DifferentialChangeType::TYPE_DELETE => true, | self::TYPE_DELETE => true, | ||||
| DifferentialChangeType::TYPE_MOVE_AWAY => true, | self::TYPE_MOVE_AWAY => true, | ||||
| DifferentialChangeType::TYPE_MULTICOPY => true, | self::TYPE_MULTICOPY => true, | ||||
| ); | ); | ||||
| return isset($types[$type]); | return isset($types[$type]); | ||||
| } | } | ||||
| public static function isCreateChangeType($type) { | public static function isCreateChangeType($type) { | ||||
| static $types = array( | static $types = array( | ||||
| DifferentialChangeType::TYPE_ADD => true, | self::TYPE_ADD => true, | ||||
| DifferentialChangeType::TYPE_COPY_HERE => true, | self::TYPE_COPY_HERE => true, | ||||
| DifferentialChangeType::TYPE_MOVE_HERE => true, | self::TYPE_MOVE_HERE => true, | ||||
| ); | ); | ||||
| return isset($types[$type]); | return isset($types[$type]); | ||||
| } | } | ||||
| public static function isModifyChangeType($type) { | public static function isModifyChangeType($type) { | ||||
| static $types = array( | static $types = array( | ||||
| DifferentialChangeType::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) { | ||||
| $types = array( | $types = array( | ||||
| self::TYPE_ADD => pht('Added'), | self::TYPE_ADD => pht('Added'), | ||||
| self::TYPE_CHANGE => pht('Modified'), | self::TYPE_CHANGE => pht('Modified'), | ||||
| Show All 13 Lines | |||||