| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 6 | public function __invoke(Activity $activity, Environment $env): void |
|
| 30 | { |
||
| 31 | 6 | if (!$activity->is(Type::start())) { |
|
| 32 | 2 | return; |
|
| 33 | } |
||
| 34 | |||
| 35 | 4 | $project = $this->filesystem->mount($env->workingDirectory()); |
|
| 36 | |||
| 37 | 4 | if (!$project->has('docker-compose.yml')) { |
|
| 38 | 2 | return; |
|
| 39 | } |
||
| 40 | |||
| 41 | 2 | $this->processes->execute( |
|
| 42 | 2 | Command::foreground('docker-compose') |
|
| 43 | 2 | ->withArgument('up') |
|
| 44 | 2 | ->withShortOption('d') |
|
| 45 | 2 | ->withWorkingDirectory((string) $env->workingDirectory()) |
|
| 46 | ); |
||
| 49 |