Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
17 | public static function fromMachine(ProcessRunner $processRunner): self |
||
18 | { |
||
19 | $process = Process::fromShellCommandline( |
||
20 | 'docker-machine inspect '. |
||
21 | '--format=\'{{.Driver.IPAddress}}\' "${MACHINE_NAME}"' |
||
22 | ); |
||
23 | |||
24 | $processRunner->mustRun($process); |
||
25 | |||
26 | $str = trim($process->getOutput()); |
||
27 | |||
28 | return self::fromIP(new IP($str)); |
||
29 | } |
||
60 |