mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Cleaned up bool comparison mess
This commit is contained in:
@ -62,7 +62,7 @@ abstract class AsyncTask extends Collectable{
|
||||
public function run(){
|
||||
$this->result = null;
|
||||
|
||||
if($this->cancelRun !== true){
|
||||
if(!$this->cancelRun){
|
||||
try{
|
||||
$this->onRun();
|
||||
}catch(\Throwable $e){
|
||||
@ -90,7 +90,7 @@ abstract class AsyncTask extends Collectable{
|
||||
}
|
||||
|
||||
public function hasCancelledRun() : bool{
|
||||
return $this->cancelRun === true;
|
||||
return $this->cancelRun;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user