We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2875a4f commit d3a854bCopy full SHA for d3a854b
src/Taskmaster.php
@@ -592,15 +592,17 @@ public function setDefaultInitTaskFactory(?TaskFactoryInterface $initTaskFactory
592
* a class name, a new instance of the class will be created for each worker instance.
593
*
594
* @param TaskInterface|class-string<TaskInterface> $task
595
- * @return void
+ * @return $this
596
*/
597
- public function setDefaultInitTask(TaskInterface|string $task): void
+ public function setDefaultInitTask(TaskInterface|string $task): static
598
{
599
if (is_string($task)) {
600
$this->initTaskFactory = new InstanceTaskFactory($task);
601
} else {
602
$this->initTaskFactory = new CloneTaskFactory($task);
603
}
604
+
605
+ return $this;
606
607
608
/**
0 commit comments