Total Complexity | 5 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
8 | class CliCommandFactory |
||
9 | { |
||
10 | /** |
||
11 | * @var Cli |
||
12 | */ |
||
13 | protected $cli; |
||
14 | |||
15 | 168 | public function __construct(Cli $cli) |
|
18 | 168 | } |
|
19 | |||
20 | /** |
||
21 | * Create a Docker CLI command. |
||
22 | * |
||
23 | * @param string $command |
||
24 | * |
||
25 | * @return CliCommand |
||
26 | */ |
||
27 | 13 | public function command($command) |
|
30 | } |
||
31 | |||
32 | /** |
||
33 | * Construct a docker-compose exec {$container} command. |
||
34 | * |
||
35 | * @param string|null $container |
||
36 | * |
||
37 | * @return CliCommand |
||
38 | */ |
||
39 | 1 | public function execContainer($container = null) |
|
42 | } |
||
43 | |||
44 | /** |
||
45 | * Construct a docker-compose run {$container} command. |
||
46 | * |
||
47 | * @param string|null $container |
||
48 | * |
||
49 | * @return CliCommand |
||
50 | */ |
||
51 | 2 | public function runContainer($container = null) |
|
59 |