MDL-80862 core: Tidy up state vars in task manager
This commit is contained in:
@@ -63,24 +63,24 @@ class manager {
|
||||
/**
|
||||
* @var array A cached queue of adhoc tasks
|
||||
*/
|
||||
public static $miniqueue;
|
||||
protected static array $miniqueue = [];
|
||||
|
||||
/**
|
||||
* @var int The last recorded number of unique adhoc tasks.
|
||||
*/
|
||||
public static $numtasks;
|
||||
protected static int $numtasks = 0;
|
||||
|
||||
/**
|
||||
* @var string Used to determine if the adhoc task queue is distributing or filling capacity.
|
||||
* @var null|int Used to determine if the adhoc task queue is distributing or filling capacity.
|
||||
*/
|
||||
public static $mode;
|
||||
protected static ?int $mode = null;
|
||||
|
||||
/**
|
||||
* Reset the state of the task manager.
|
||||
*/
|
||||
public static function reset_state(): void {
|
||||
self::$miniqueue = null;
|
||||
self::$numtasks = null;
|
||||
self::$miniqueue = [];
|
||||
self::$numtasks = 0;
|
||||
self::$mode = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,10 @@ information provided here is intended especially for developers.
|
||||
* The nocache option for format_text has been removed. It was deprecated in Moodle 2.3.
|
||||
* The set_heading() method has a new parameter, $clean, to define whether the heading should be cleaned or not when no formatting
|
||||
is applied.
|
||||
* Visibility of internal properties of the \core\task\manager have been changed from public to protected. These should not have been accessible.
|
||||
- $miniqueue
|
||||
- $numtasks
|
||||
- $mode
|
||||
|
||||
=== 4.3 ===
|
||||
|
||||
|
||||
Reference in New Issue
Block a user