Test Failed
Push — master ( bac6db...ab716d )
by Gianluca
24:27
created

DeleteConfigFile::handle()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 6
c 1
b 0
f 1
dl 0
loc 11
rs 10
cc 2
nc 2
nop 0
1
<?php
2
3
namespace Mongi\Mongicommerce\Console;
4
5
use Illuminate\Console\Command;
6
use Illuminate\Support\Facades\File;
7
8
class DeleteConfigFile extends Command
9
{
10
    protected $signature = 'mongicommerce:deleteconfigfile';
11
12
    protected $description = 'Delete config file';
13
14
    public function handle()
15
    {
16
        $this->alert('delete Mongicommerce config file...');
17
18
        $config_file = config_path('mongicommerce.php');
19
        #Config file
20
        if (file_exists($config_file)) {
21
            File::delete($config_file);
22
            error_log('Cancello il file di configurazione');
23
        }
24
        $this->alert('Terminate successfully');
25
    }
26
}
27