From 65f82f5cdf7d113c3695b64b7c899ee60b4dac24 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 17 May 2020 13:58:01 +0100 Subject: [PATCH] Task::onRun() and Task::onCancel() now require :void return typehints --- src/scheduler/Task.php | 8 ++------ .../src/pmmp/TesterPlugin/CheckTestCompletionTask.php | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/scheduler/Task.php b/src/scheduler/Task.php index 9d3e5a6fe..85c0da6c7 100644 --- a/src/scheduler/Task.php +++ b/src/scheduler/Task.php @@ -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{ } } diff --git a/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/CheckTestCompletionTask.php b/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/CheckTestCompletionTask.php index 49ee205b0..9cebd98a4 100644 --- a/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/CheckTestCompletionTask.php +++ b/tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/CheckTestCompletionTask.php @@ -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()){