Differential D25235 Diff 790 src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldInt.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldInt.php
Show All 18 Lines | final class PhabricatorStandardCustomFieldInt | ||||
} | } | ||||
public function buildOrderIndex() { | public function buildOrderIndex() { | ||||
return $this->newNumericIndex(0); | return $this->newNumericIndex(0); | ||||
} | } | ||||
public function getValueForStorage() { | public function getValueForStorage() { | ||||
$value = $this->getFieldValue(); | $value = $this->getFieldValue(); | ||||
if (strlen($value)) { | $is_nonempty = phutil_string_cast($value) !== ''; | ||||
if ($is_nonempty) { | |||||
return $value; | return $value; | ||||
} else { | } else { | ||||
return null; | return null; | ||||
} | } | ||||
} | } | ||||
public function setValueFromStorage($value) { | public function setValueFromStorage($value) { | ||||
if (strlen($value)) { | if (strlen($value)) { | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 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