| Total Complexity | 5 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class CliCommandFactory |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var Cli |
||
| 12 | */ |
||
| 13 | protected $cli; |
||
| 14 | |||
| 15 | public function __construct(Cli $cli) |
||
| 16 | { |
||
| 17 | $this->cli = $cli; |
||
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Create a Docker CLI command. |
||
| 22 | * |
||
| 23 | * @param string $command |
||
| 24 | * |
||
| 25 | * @return CliCommand |
||
| 26 | */ |
||
| 27 | public function command($command) |
||
| 28 | { |
||
| 29 | return new CliCommand($this->cli, $command); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Construct a docker-compose exec {$container} command. |
||
| 34 | * |
||
| 35 | * @param string|null $container |
||
| 36 | * |
||
| 37 | * @return CliCommand |
||
| 38 | */ |
||
| 39 | 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 | public function runContainer($container = null) |
||
| 57 | } |
||
| 58 | } |
||
| 59 |