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

DeleteFileAdmin::handle()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 4
c 1
b 0
f 1
dl 0
loc 9
rs 10
cc 2
nc 2
nop 0
1
<?php
2
namespace Mongi\Mongicommerce\Console;
3
4
use Illuminate\Console\Command;
5
use Illuminate\Support\Facades\File;
6
7
class DeleteFileAdmin extends Command
8
{
9
    protected $signature = 'mongicommerce:deleteadminfiles';
10
11
    protected $description = 'Delete files assets admin';
12
13
    public function handle()
14
    {
15
        $this->alert('delete Mongicommerce admin template assets...');
16
17
        #Public path
18
        if (file_exists(public_path('/mongicommerce/template/admin'))) {
19
            File::deleteDirectory(public_path('/mongicommerce/template/admin'));
20
        }
21
        $this->alert('Terminate successfully');
22
    }
23
}
24