Differential D18156 Diff 43702 src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/management/PhabricatorConfigManagementSetWorkflow.php
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | if ($type) { | ||||
$option, | $option, | ||||
$value); | $value); | ||||
} catch (PhabricatorConfigValidationException $ex) { | } catch (PhabricatorConfigValidationException $ex) { | ||||
throw new PhutilArgumentUsageException($ex->getMessage()); | throw new PhutilArgumentUsageException($ex->getMessage()); | ||||
} | } | ||||
} else { | } else { | ||||
$type = $option->getType(); | $type = $option->getType(); | ||||
switch ($type) { | switch ($type) { | ||||
case 'string': | |||||
case 'class': | case 'class': | ||||
case 'enum': | |||||
$value = (string)$value; | $value = (string)$value; | ||||
break; | break; | ||||
case 'bool': | case 'bool': | ||||
if ($value == 'true') { | if ($value == 'true') { | ||||
$value = true; | $value = true; | ||||
} else if ($value == 'false') { | } else if ($value == 'false') { | ||||
$value = false; | $value = false; | ||||
} else { | } else { | ||||
▲ Show 20 Lines • Show All 95 Lines • Show Last 20 Lines |