Skip to content

Commit 8f64933

Browse files
committed
Fix comment
1 parent 729b207 commit 8f64933

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Alternatively get a defined task.
140140

141141
Name of current task.
142142
- ### body
143-
**type**: `callable|array|string|null `
143+
**type**: `callable|array|null `
144144

145145
Callable task, array of other tasks names or nothing to get a defined tasks
146146

src/functions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function desc(?string $title = null): ?string
159159
* Alternatively get a defined task.
160160
*
161161
* @param string $name Name of current task.
162-
* @param callable|array|string|null $body Callable task, array of other tasks names or nothing to get a defined tasks
162+
* @param callable|array|null $body Callable task, array of other tasks names or nothing to get a defined tasks
163163
*/
164164
function task(string $name, $body = null): Task
165165
{
@@ -174,7 +174,7 @@ function task(string $name, $body = null): Task
174174
} elseif (is_array($body)) {
175175
$task = new GroupTask($name, $body);
176176
} else {
177-
throw new \InvalidArgumentException('Task should be a closure or array of other tasks.');
177+
throw new \InvalidArgumentException('Task body should be a function or an array.');
178178
}
179179

180180
$task->saveSourceLocation();

0 commit comments

Comments
 (0)