mirror of
https://github.com/amphp/parallel.git
synced 2025-02-22 05:42:36 +01:00
parent
bcfb30fa35
commit
689de9a28b
@ -22,6 +22,11 @@ class Job {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getTask(): Task {
|
public function getTask(): Task {
|
||||||
|
// Classes that cannot be autoloaded will be unserialized as an instance of __PHP_Incomplete_Class.
|
||||||
|
\assert(
|
||||||
|
$this->task instanceof Task,
|
||||||
|
\sprintf("Classes implementing %s must be autoloadable by the Composer autoloader", Task::class)
|
||||||
|
);
|
||||||
return $this->task;
|
return $this->task;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user