Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
32 | public function findByName($name) |
||
33 | { |
||
34 | $rawOutput = $this->processRunner->run('docker-compose ps -q '.$name)->getOutput(); |
||
35 | $ids = $this->parseOutput($rawOutput); |
||
36 | |||
37 | if (count($ids) == 0) { |
||
38 | throw new \RuntimeException(sprintf( |
||
39 | 'No container named "%s" found', |
||
40 | $name |
||
41 | )); |
||
42 | } |
||
43 | |||
44 | return current($ids); |
||
45 | } |
||
46 | |||
67 |