Task::onRun() and Task::onCancel() now require :void return typehints

This commit is contained in:
Dylan K. Taylor 2020-05-17 13:58:01 +01:00
parent b3454b3488
commit 65f82f5cdf
2 changed files with 3 additions and 7 deletions

View File

@ -57,17 +57,13 @@ abstract class Task{
/**
* Actions to execute when run
*
* @return void
*/
abstract public function onRun();
abstract public function onRun() : void;
/**
* Actions to execute if the Task is cancelled
*
* @return void
*/
public function onCancel(){
public function onCancel() : void{
}
}

View File

@ -34,7 +34,7 @@ class CheckTestCompletionTask extends Task{
$this->plugin = $plugin;
}
public function onRun(){
public function onRun() : void{
$test = $this->plugin->getCurrentTest();
if($test === null){
if(!$this->plugin->startNextTest()){