public function valid() { if ($this->upper >= $this->lower) { return $this->current >= $this->lower && $this->current <= $this->upper; } else { return $this->current <= $this->lower && $this->current >= $this->upper; } }