original_string: public function is_finished() {
  
          if ($this->finished === null) {
              $endtime = $this->get_end();
              if ($endtime === 0 || $this->now < $endtime) {
                  // It is not yet finished or no idea when it finishes.
                  $this->finished = false;
              } else {
                  $this->finished = true;
              }
          }
  
          return $this->finished;
      }
code: public function is_finished() {
  
          if ($this->finished === null) {
              $endtime = $this->get_end();
              if ($endtime === 0 || $this->now < $endtime) {
                  // It is not yet finished or no idea when it finishes.
                  $this->finished = false;
              } else {
                  $this->finished = true;
              }
          }
  
          return $this->finished;
      }
code_tokens: public function is_finished ( ) { if ( $ this -> finished === null ) { $ endtime = $ this -> get_end ( ) ; if ( $ endtime === 0 || $ this -> now < $ endtime ) { // It is not yet finished or no idea when it finishes. $ this -> finished = false ; } else { $ this -> finished = true ; } } return $ this -> finished ; }
docstring: Has the course finished?
  
  @return bool
docstring_tokens: Has the course finished?