mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 17:06:16 +00:00
Modernize private property declarations in Threaded classes
I previously avoided this due to being unsure of the effects; however, it's clear that we already use typed properties on Threaded things in other places anyway, and the only known issues are with uninit properties, and arrays.
This commit is contained in:
@ -62,19 +62,13 @@ abstract class AsyncTask extends \Threaded{
|
||||
/** @var \Threaded */
|
||||
public $progressUpdates;
|
||||
|
||||
/** @var scalar|null */
|
||||
private $result = null;
|
||||
/** @var bool */
|
||||
private $serialized = false;
|
||||
/** @var bool */
|
||||
private $cancelRun = false;
|
||||
/** @var bool */
|
||||
private $submitted = false;
|
||||
private string|int|bool|null|float $result = null;
|
||||
private bool $serialized = false;
|
||||
private bool $cancelRun = false;
|
||||
private bool $submitted = false;
|
||||
|
||||
/** @var bool */
|
||||
private $crashed = false;
|
||||
/** @var bool */
|
||||
private $finished = false;
|
||||
private bool $crashed = false;
|
||||
private bool $finished = false;
|
||||
|
||||
public function run() : void{
|
||||
$this->result = null;
|
||||
|
@ -37,8 +37,7 @@ use function igbinary_unserialize;
|
||||
class BulkCurlTask extends AsyncTask{
|
||||
private const TLS_KEY_COMPLETION_CALLBACK = "completionCallback";
|
||||
|
||||
/** @var string */
|
||||
private $operations;
|
||||
private string $operations;
|
||||
|
||||
/**
|
||||
* BulkCurlTask constructor.
|
||||
|
Reference in New Issue
Block a user