Fix comment

This commit is contained in:
Anton Medvedev 2021-04-18 13:53:15 +02:00
parent 729b207cde
commit 8f649331a5
2 changed files with 3 additions and 3 deletions

View File

@ -140,7 +140,7 @@ Alternatively get a defined task.
Name of current task.
- ### body
**type**: `callable|array|string|null `
**type**: `callable|array|null `
Callable task, array of other tasks names or nothing to get a defined tasks

View File

@ -159,7 +159,7 @@ function desc(?string $title = null): ?string
* Alternatively get a defined task.
*
* @param string $name Name of current task.
* @param callable|array|string|null $body Callable task, array of other tasks names or nothing to get a defined tasks
* @param callable|array|null $body Callable task, array of other tasks names or nothing to get a defined tasks
*/
function task(string $name, $body = null): Task
{
@ -174,7 +174,7 @@ function task(string $name, $body = null): Task
} elseif (is_array($body)) {
$task = new GroupTask($name, $body);
} else {
throw new \InvalidArgumentException('Task should be a closure or array of other tasks.');
throw new \InvalidArgumentException('Task body should be a function or an array.');
}
$task->saveSourceLocation();