value = $value; $this->rangeLimit = $rangeLimit; $this->nextValidator = $nextValidator; } public function isCurrentValid(): bool { if($this->value > $this->rangeLimit) return false; return true; } public function isValid(): bool { return $this->isCurrentValid() && $this->nextValidator->isValid(); } }