Reinstall   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
eloc 11
c 2
b 0
f 1
dl 0
loc 22
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 16 2
1
<?php
2
3
namespace EasyPanel\Commands\Actions;
4
5
use Illuminate\Console\Command;
6
use Illuminate\Support\Facades\Artisan;
7
8
class Reinstall extends Command
9
{
10
11
    protected $signature = 'panel:reinstall';
12
    protected $description = 'Reinstall whole the package';
13
14
    public function handle()
15
    {
16
        $status = $this->confirm("Do you really want to reinstall the panel ? (All components will be deleted)", true);
17
18
        if(!$status) {
19
            $this->info("The process was canceled");
20
            return;
21
        }
22
23
        Artisan::call("panel:uninstall", [
24
            '--force' => true,
25
        ]);
26
27
        Artisan::call("panel:install");
28
29
        $this->info("The package was reinstalled!");
30
    }
31
}
32