value = filter_var($value, FILTER_VALIDATE_FLOAT); if ($this->value === false) { throw new InvalidArgumentException('Invalid float value ' . $value); } } public function get(): float { return $this->value; } }