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

DeleteFileAdmin   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 9 2
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