From 7ae5944c426493e502d8b41b8e02685ed41ceadf Mon Sep 17 00:00:00 2001 From: Linda Date: Wed, 11 Oct 2023 08:38:50 +0200 Subject: [PATCH] Update adhoc return type Seeing that the instance() function returns the task, it should not be marked as returning void. --- docs/apis/subsystems/task/adhoc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/apis/subsystems/task/adhoc.md b/docs/apis/subsystems/task/adhoc.md index 8c95efdb14..6b1f3e1071 100644 --- a/docs/apis/subsystems/task/adhoc.md +++ b/docs/apis/subsystems/task/adhoc.md @@ -67,7 +67,7 @@ class do_something extends \core\task\adhoc_task { public static function instance( int $id, string $status, - ): void { + ): self { $task = new self(); $task->set_custom_data((object) [ 'id' => $id,