public function buildTaskFromClosure(Closure $callback, $stringTask = null)
{
/** @type \Rocketeer\Tasks\Closure $task */
$task = $this->buildTaskFromClass('Rocketeer\\Tasks\\Closure');
$task->setClosure($callback);
// If we had an original string used, store it on
// the task for easier reflection
if ($stringTask) {
$task->setStringTask($stringTask);
}
return $task;
}