min = $min; $this->max = $max; } public function min() { return $this->min; } public function max() { return $this->max; } public function isNull() { return $this->min === null && $this->max === null; } public function isNotNull() { return !$this->isNull(); } public function jsonSerialize(): mixed { return [ 'min' => $this->min, 'max' => $this->max, ]; } }