original_string: public static function record_from_scheduled_task($task) {
          $record = new \stdClass();
          $record->classname = self::get_canonical_class_name($task);
          $record->component = $task->get_component();
          $record->blocking = $task->is_blocking();
          $record->customised = $task->is_customised();
          $record->lastruntime = $task->get_last_run_time();
          $record->nextruntime = $task->get_next_run_time();
          $record->faildelay = $task->get_fail_delay();
          $record->hour = $task->get_hour();
          $record->minute = $task->get_minute();
          $record->day = $task->get_day();
          $record->dayofweek = $task->get_day_of_week();
          $record->month = $task->get_month();
          $record->disabled = $task->get_disabled();
  
          return $record;
      }
code: public static function record_from_scheduled_task($task) {
          $record = new \stdClass();
          $record->classname = self::get_canonical_class_name($task);
          $record->component = $task->get_component();
          $record->blocking = $task->is_blocking();
          $record->customised = $task->is_customised();
          $record->lastruntime = $task->get_last_run_time();
          $record->nextruntime = $task->get_next_run_time();
          $record->faildelay = $task->get_fail_delay();
          $record->hour = $task->get_hour();
          $record->minute = $task->get_minute();
          $record->day = $task->get_day();
          $record->dayofweek = $task->get_day_of_week();
          $record->month = $task->get_month();
          $record->disabled = $task->get_disabled();
  
          return $record;
      }
code_tokens: public static function record_from_scheduled_task ( $ task ) { $ record = new \ stdClass ( ) ; $ record -> classname = self :: get_canonical_class_name ( $ task ) ; $ record -> component = $ task -> get_component ( ) ; $ record -> blocking = $ task -> is_blocking ( ) ; $ record -> customised = $ task -> is_customised ( ) ; $ record -> lastruntime = $ task -> get_last_run_time ( ) ; $ record -> nextruntime = $ task -> get_next_run_time ( ) ; $ record -> faildelay = $ task -> get_fail_delay ( ) ; $ record -> hour = $ task -> get_hour ( ) ; $ record -> minute = $ task -> get_minute ( ) ; $ record -> day = $ task -> get_day ( ) ; $ record -> dayofweek = $ task -> get_day_of_week ( ) ; $ record -> month = $ task -> get_month ( ) ; $ record -> disabled = $ task -> get_disabled ( ) ; return $ record ; }
docstring: Utility method to create a DB record from a scheduled task.
  
  @param \core\task\scheduled_task $task
  @return \stdClass
docstring_tokens: Utility method to create a DB record from a scheduled task .