value = $default; } else { $this->value = is_float($default) ? (float) $value : (int) $value; } } /** @return int|float */ public function value() { return $this->value; } /** @return string */ public function asAttr() { return esc_attr((string) $this->value); } }