original_string: protected function get_favourite_from_record(\stdClass $record) : favourite {
          $favourite = new favourite(
              $record->component,
              $record->itemtype,
              $record->itemid,
              $record->contextid,
              $record->userid
          );
          $favourite->id = $record->id;
          $favourite->ordering = $record->ordering ?? null;
          $favourite->timecreated = $record->timecreated ?? null;
          $favourite->timemodified = $record->timemodified ?? null;
  
          return $favourite;
      }
code: protected function get_favourite_from_record(\stdClass $record) : favourite {
          $favourite = new favourite(
              $record->component,
              $record->itemtype,
              $record->itemid,
              $record->contextid,
              $record->userid
          );
          $favourite->id = $record->id;
          $favourite->ordering = $record->ordering ?? null;
          $favourite->timecreated = $record->timecreated ?? null;
          $favourite->timemodified = $record->timemodified ?? null;
  
          return $favourite;
      }
code_tokens: protected function get_favourite_from_record ( \ stdClass $ record ) : favourite { $ favourite = new favourite ( $ record -> component , $ record -> itemtype , $ record -> itemid , $ record -> contextid , $ record -> userid ) ; $ favourite -> id = $ record -> id ; $ favourite -> ordering = $ record -> ordering ?? null ; $ favourite -> timecreated = $ record -> timecreated ?? null ; $ favourite -> timemodified = $ record -> timemodified ?? null ; return $ favourite ; }
docstring: Get a favourite object, based on a full record.
  @param \stdClass $record the record we wish to hydrate.
  @return favourite the favourite record.
docstring_tokens: Get a favourite object based on a full record .