| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 30 | public function isRunning(): bool |
||
| 31 | { |
||
| 32 | $process = Process::fromShellCommandline( |
||
| 33 | 'docker-machine ls -q --filter="state=running" --filter="name=${MACHINE_NAME}"' |
||
| 34 | ); |
||
| 35 | $process->run(); |
||
| 36 | if ($process->isSuccessful()) { |
||
| 37 | return $this->machineName->toString() === trim($process->getOutput()); |
||
| 38 | } |
||
| 39 | |||
| 40 | return false; |
||
| 41 | } |
||
| 43 |