Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/constants/ManiphestTaskPriority.php
Show First 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | private static function isValidPriorityKeyword($keyword) { | ||||
return true; | return true; | ||||
} | } | ||||
public static function validateConfiguration($config) { | public static function validateConfiguration($config) { | ||||
if (!is_array($config)) { | if (!is_array($config)) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'Configuration is not valid. Maniphest priority configurations '. | 'Configuration is not valid. Maniphest priority configurations '. | ||||
'must be dictionaries.', | 'must be dictionaries.')); | ||||
$config)); | |||||
} | } | ||||
$all_keywords = array(); | $all_keywords = array(); | ||||
foreach ($config as $key => $value) { | foreach ($config as $key => $value) { | ||||
if (!ctype_digit((string)$key)) { | if (!ctype_digit((string)$key)) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'Key "%s" is not a valid priority constant. Priority constants '. | 'Key "%s" is not a valid priority constant. Priority constants '. | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |