Conditions | 3 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
10 | public function run(Filesystem $fs) |
||
11 | { |
||
12 | $version = [ |
||
13 | 'php' => PHP_VERSION |
||
14 | ]; |
||
15 | |||
16 | $lock = $fs->getPath('composer.lock'); |
||
17 | if (is_file($lock)) { |
||
18 | $info = json_decode(file_get_contents($lock)); |
||
19 | foreach ($info->packages as $package) { |
||
20 | $version[$package->name] = $package->version; |
||
21 | } |
||
22 | } |
||
23 | |||
24 | return compact('version'); |
||
25 | } |
||
26 | } |
||
27 |