mirror of
https://github.com/danog/parallel.git
synced 2025-01-22 05:51:14 +01:00
parent
bcfb30fa35
commit
689de9a28b
@ -22,6 +22,11 @@ class Job {
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user