mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 20:07:09 +00:00
Task::onRun() and Task::onCancel() now require :void return typehints
This commit is contained in:
parent
b3454b3488
commit
65f82f5cdf
@ -57,17 +57,13 @@ abstract class Task{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Actions to execute when run
|
* Actions to execute when run
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
abstract public function onRun();
|
abstract public function onRun() : void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Actions to execute if the Task is cancelled
|
* Actions to execute if the Task is cancelled
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
public function onCancel(){
|
public function onCancel() : void{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ class CheckTestCompletionTask extends Task{
|
|||||||
$this->plugin = $plugin;
|
$this->plugin = $plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onRun(){
|
public function onRun() : void{
|
||||||
$test = $this->plugin->getCurrentTest();
|
$test = $this->plugin->getCurrentTest();
|
||||||
if($test === null){
|
if($test === null){
|
||||||
if(!$this->plugin->startNextTest()){
|
if(!$this->plugin->startNextTest()){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user