original_string: public static function get_default_scheduled_task($classname) {
          $task = self::get_scheduled_task($classname);
          $componenttasks = array();
  
          // Safety check in case no task was found for the given classname.
          if ($task) {
              $componenttasks = self::load_default_scheduled_tasks_for_component($task->get_component());
          }
  
          foreach ($componenttasks as $componenttask) {
              if (get_class($componenttask) == get_class($task)) {
                  return $componenttask;
              }
          }
  
          return false;
      }
code: public static function get_default_scheduled_task($classname) {
          $task = self::get_scheduled_task($classname);
          $componenttasks = array();
  
          // Safety check in case no task was found for the given classname.
          if ($task) {
              $componenttasks = self::load_default_scheduled_tasks_for_component($task->get_component());
          }
  
          foreach ($componenttasks as $componenttask) {
              if (get_class($componenttask) == get_class($task)) {
                  return $componenttask;
              }
          }
  
          return false;
      }
code_tokens: public static function get_default_scheduled_task ( $ classname ) { $ task = self :: get_scheduled_task ( $ classname ) ; $ componenttasks = array ( ) ; // Safety check in case no task was found for the given classname. if ( $ task ) { $ componenttasks = self :: load_default_scheduled_tasks_for_component ( $ task -> get_component ( ) ) ; } foreach ( $ componenttasks as $ componenttask ) { if ( get_class ( $ componenttask ) == get_class ( $ task ) ) { return $ componenttask ; } } return false ; }
docstring: This function load the default scheduled task details for a given classname.
  
  @param string $classname
  @return \core\task\scheduled_task or false
docstring_tokens: This function load the default scheduled task details for a given classname .