Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/export/field/PhabricatorOptionExportField.php
Show All 9 Lines | public function setOptions(array $options) { | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getOptions() { | public function getOptions() { | ||||
return $this->options; | return $this->options; | ||||
} | } | ||||
public function getNaturalValue($value) { | public function getNaturalValue($value) { | ||||
// TODO: Remove this case since it's probably already covered | |||||
Lint: TODO Comment: This comment has a TODO. | |||||
if ($value === null) { | if ($value === null) { | ||||
return $value; | return $value; | ||||
} | } | ||||
if (!strlen($value)) { | if (!phutil_nonempty_string($value)) { | ||||
return null; | return null; | ||||
} | } | ||||
$options = $this->getOptions(); | $options = $this->getOptions(); | ||||
return array( | return array( | ||||
'value' => (string)$value, | 'value' => (string)$value, | ||||
'name' => (string)idx($options, $value, $value), | 'name' => (string)idx($options, $value, $value), | ||||
Show All 17 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
This comment has a TODO.