Conditions | 3 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
31 | public function handle(): void |
||
32 | { |
||
33 | $site = Site::resolveFromPathOrCurrentWorkingDirectoryOrFail($this->argument('site')); |
||
34 | |||
35 | $currentVersion = $site->php_version->version_number; |
||
36 | |||
37 | $option = $this->menu( |
||
|
|||
38 | 'Available PHP versions', |
||
39 | PhpVersion::pluck('version_number', 'id') |
||
40 | ->map(function ($version) use ($currentVersion) { |
||
41 | return $version . ($version == $currentVersion ? ' (current)' : ''); |
||
42 | })->toArray() |
||
43 | )->open(); |
||
44 | |||
45 | if (! $option) { |
||
46 | return; |
||
47 | } |
||
48 | |||
49 | $site->setPhpVersion($option); |
||
50 | } |
||
52 |