Skip to content

Commit 43c4996

Browse files
author
Bastian Schwarz
committed
Updated annotation with return type of callable to be more specific
1 parent 4bf1048 commit 43c4996

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/functions/All.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function add(string $name, array $array) : void {
5252
add($name, $array);
5353
}
5454

55-
public function after(string $task, callable|\de\codenamephp\deployer\base\task\iTask|string $do) : ?Task {
55+
public function after(string $task, callable|iTask|string $do) : ?Task {
5656
return after($task, $do);
5757
}
5858

@@ -157,7 +157,7 @@ public function set(string $name, mixed $value) : void {
157157
set($name, $value);
158158
}
159159

160-
public function task(string $name, callable|array|\de\codenamephp\deployer\base\task\iTask|null $body = null) : Task {
160+
public function task(string $name, callable|array|iTask|null $body = null) : Task {
161161
return \Deployer\task($name, $body);
162162
}
163163

src/functions/iBefore.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ interface iBefore {
2929
* Registers a task to be executed before another task
3030
*
3131
* @param string $task The name of the task the given task should be executed before
32-
* @param callable|iTask|string $do The task to execute before the given task name
32+
* @param callable():void|iTask|string $do The task to execute before the given task name
3333
* @return Task|null The added task or null if no task was added
3434
*/
35-
public function before(string $task, callable|\de\codenamephp\deployer\base\task\iTask|string $do) : ?Task;
35+
public function before(string $task, iTask|string|callable $do) : ?Task;
3636
}

0 commit comments

Comments
 (0)