original_string: public function exists(int $id) : bool {
          global $DB;
          return $DB->record_exists($this->favouritetable, ['id' => $id]);
      }
code: public function exists(int $id) : bool {
          global $DB;
          return $DB->record_exists($this->favouritetable, ['id' => $id]);
      }
code_tokens: public function exists ( int $ id ) : bool { global $ DB ; return $ DB -> record_exists ( $ this -> favouritetable , [ 'id' => $ id ] ) ; }
docstring: Check whether a favourite exists in this repository, based on its id.
  
  @param int $id the id to search for.
  @return bool true if the favourite exists, false otherwise.
  @throws \dml_exception if any database errors are encountered.
docstring_tokens: Check whether a favourite exists in this repository based on its id .