Modernize private property declarations in src/scheduler

This commit is contained in:
Dylan K. Taylor
2022-05-17 21:53:38 +01:00
parent 9e59819f06
commit 9de88aa734
8 changed files with 37 additions and 88 deletions

View File

@ -31,11 +31,7 @@ use pocketmine\utils\ObjectSet;
use pocketmine\utils\ReversePriorityQueue;
class TaskScheduler{
/** @var string|null */
private $owner;
/** @var bool */
private $enabled = true;
private bool $enabled = true;
/**
* @var ReversePriorityQueue
@ -52,8 +48,9 @@ class TaskScheduler{
/** @var int */
protected $currentTick = 0;
public function __construct(?string $owner = null){
$this->owner = $owner;
public function __construct(
private ?string $owner = null
){
$this->queue = new ReversePriorityQueue();
$this->tasks = new ObjectSet();
}