original_string: protected function get_course($courseid) {
          if (!empty($this->cachedcourses[$courseid])) {
              return $this->cachedcourses[$courseid];
          }
  
          // No need to clone, only read.
          $this->cachedcourses[$courseid] = get_course($courseid, false);
  
          return $this->cachedcourses[$courseid];
      }
code: protected function get_course($courseid) {
          if (!empty($this->cachedcourses[$courseid])) {
              return $this->cachedcourses[$courseid];
          }
  
          // No need to clone, only read.
          $this->cachedcourses[$courseid] = get_course($courseid, false);
  
          return $this->cachedcourses[$courseid];
      }
code_tokens: protected function get_course ( $ courseid ) { if ( ! empty ( $ this -> cachedcourses [ $ courseid ] ) ) { return $ this -> cachedcourses [ $ courseid ] ; } // No need to clone, only read. $ this -> cachedcourses [ $ courseid ] = get_course ( $ courseid , false ) ; return $ this -> cachedcourses [ $ courseid ] ; }
docstring: Returns a course instance checking internal caching.
  
  @param int $courseid
  @return stdClass
docstring_tokens: Returns a course instance checking internal caching .