Skip to content

Commit 8c4d5f1

Browse files
author
Bastian Schwarz
committed
Added new interface
1 parent 330520e commit 8c4d5f1

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

src/functions/iBefore.php

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php declare(strict_types=1);
2+
/*
3+
* Copyright 2023 Bastian Schwarz <bastian@codename-php.de>.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
namespace de\codenamephp\deployer\base\functions;
19+
20+
use de\codenamephp\deployer\base\task\iTask;
21+
use Deployer\Task\Task;
22+
23+
/**
24+
* Interface for the Deployer\before function
25+
*/
26+
interface iBefore {
27+
28+
/**
29+
* Registers a task to be executed before another task
30+
*
31+
* @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
33+
* @return Task|null The added task or null if no task was added
34+
*/
35+
public function before(string $task, callable|\de\codenamephp\deployer\base\task\iTask|string $do) : ?Task;
36+
}

0 commit comments

Comments
 (0)