Skip to content

Commit 1dd6cf5

Browse files
author
Bastian Schwarz
committed
Added new interface to all interface and implemented the method in the existing function class
1 parent 8c4d5f1 commit 1dd6cf5

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/functions/All.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
use Closure;
2121
use de\codenamephp\deployer\base\MissingConfigurationException;
22+
use de\codenamephp\deployer\base\task\iTask;
2223
use de\codenamephp\deployer\base\task\iTaskWithDescription;
2324
use de\codenamephp\deployer\base\task\iTaskWithName;
2425
use Deployer\Deployer;
@@ -29,6 +30,7 @@
2930
use Symfony\Component\Console\Input\InputArgument;
3031
use function Deployer\add;
3132
use function Deployer\after;
33+
use function Deployer\before;
3234
use function Deployer\currentHost;
3335
use function Deployer\download;
3436
use function Deployer\get;
@@ -54,6 +56,10 @@ public function after(string $task, callable|\de\codenamephp\deployer\base\task\
5456
return after($task, $do);
5557
}
5658

59+
public function before(string $task, callable|iTask|string $do) : ?Task {
60+
return before($task, $do);
61+
}
62+
5763
public function currentHost() : Host {
5864
return currentHost();
5965
}

src/functions/iAll.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
*
2323
* The idea is to provide a stable, typed API and also a level of abstraction to the global deployer functions so testing is easier.
2424
*/
25-
interface iAll extends iAdd, iAfter, iCurrentHost, iDownload, iGet, iHost, iInput, iLocalhost, iOn, iParse, iRun, iSet, iTask, iUpload {
25+
interface iAll extends iAdd, iAfter, iBefore, iCurrentHost, iDownload, iGet, iHost, iInput, iLocalhost, iOn, iParse, iRun, iSet, iTask, iUpload {
2626

2727
}

0 commit comments

Comments
 (0)