original_string: public function find(int $id) : favourite {
          global $DB;
          $record = $DB->get_record($this->favouritetable, ['id' => $id], '*', MUST_EXIST);
          return $this->get_favourite_from_record($record);
      }
code: public function find(int $id) : favourite {
          global $DB;
          $record = $DB->get_record($this->favouritetable, ['id' => $id], '*', MUST_EXIST);
          return $this->get_favourite_from_record($record);
      }
code_tokens: public function find ( int $ id ) : favourite { global $ DB ; $ record = $ DB -> get_record ( $ this -> favouritetable , [ 'id' => $ id ] , '*' , MUST_EXIST ) ; return $ this -> get_favourite_from_record ( $ record ) ; }
docstring: Find a favourite by id.
  
  @param int $id the id of the favourite.
  @return favourite the favourite.
  @throws \dml_exception if any database errors are encountered.
docstring_tokens: Find a favourite by id .