function increment()

in src/legacy_fixme/coercions.php [20:35]


function increment(mixed $value)[]: dynamic {
  if ($value is null) {
    return 1;
  }
  if ($value is string) {
    if (\is_numeric($value)) {
      return \HH\str_to_numeric($value) as nonnull + 1;
    }
    if ($value === '') {
      return '1';
    }
  }
  $value as dynamic;
  ++$value;
  return $value;
}