| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | protected function getInstalledPackages() |
||
| 33 | { |
||
| 34 | $process = new Process('composer show -i -f json', base_path()); |
||
| 35 | $process->run(); |
||
| 36 | $output = $process->getOutput(); |
||
| 37 | |||
| 38 | if (!$process->isSuccessful()) { |
||
| 39 | Log::error($process->getErrorOutput()); |
||
| 40 | |||
| 41 | return []; |
||
| 42 | } |
||
| 43 | |||
| 44 | $output = json_decode($output, true); |
||
| 45 | $r = $output['installed']; |
||
| 46 | |||
| 47 | return $r; |
||
| 48 | } |
||
| 49 | } |
||
| 50 |