original_string: public function setRange(string $rangeStart = null, string $rangeEnd = null): Matomo
      {
          $this->_date = '';
          $this->_rangeStart = $rangeStart;
          $this->_rangeEnd = $rangeEnd;
  
          if (is_null($rangeEnd)) {
              if (strpos($rangeStart, 'last') !== false || strpos($rangeStart, 'previous') !== false) {
                  $this->setDate($rangeStart);
              } else {
                  $this->_rangeEnd = self::DATE_TODAY;
              }
          }
  
          return $this;
      }
code: public function setRange(string $rangeStart = null, string $rangeEnd = null): Matomo
      {
          $this->_date = '';
          $this->_rangeStart = $rangeStart;
          $this->_rangeEnd = $rangeEnd;
  
          if (is_null($rangeEnd)) {
              if (strpos($rangeStart, 'last') !== false || strpos($rangeStart, 'previous') !== false) {
                  $this->setDate($rangeStart);
              } else {
                  $this->_rangeEnd = self::DATE_TODAY;
              }
          }
  
          return $this;
      }
code_tokens: public function setRange ( string $ rangeStart = null , string $ rangeEnd = null ) : Matomo { $ this -> _date = '' ; $ this -> _rangeStart = $ rangeStart ; $ this -> _rangeEnd = $ rangeEnd ; if ( is_null ( $ rangeEnd ) ) { if ( strpos ( $ rangeStart , 'last' ) !== false || strpos ( $ rangeStart , 'previous' ) !== false ) { $ this -> setDate ( $ rangeStart ) ; } else { $ this -> _rangeEnd = self :: DATE_TODAY ; } } return $ this ; }
docstring: Set date range
  
  @param string $rangeStart e.g. 2012-02-10 (YYYY-mm-dd) or last5(lastX), previous12(previousY)...
  @param string $rangeEnd e.g. 2012-02-12. Leave this parameter empty to request all data from
  $rangeStart until now
  @return $this
docstring_tokens: Set date range