Passed
Push — dev5 ( 1140b1...da16e0 )
by Ron
09:38
created

backupList   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 23.08%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 3
dl 0
loc 26
ccs 3
cts 13
cp 0.2308
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A handle() 0 15 3
1
<?php
2
3
namespace App\Console\Commands;
4
5
use Illuminate\Console\Command;
6
use Illuminate\Support\Facades\Storage;
7
8
class backupList extends Command
9
{
10
    protected $signature = 'tb-backup:list';
11
    protected $description = 'List all of the available backups';
12
13 2
    public function __construct()
14
    {
15 2
        parent::__construct();
16 2
    }
17
18
    public function handle()
19
    {
20
        $this->line('Showing all available backups');
21
        $this->line('');
22
        $this->line('Name              Date     Time');
23
        $this->line('-------------------------------------');
24
        $fileList = Storage::disk('backup')->files();
25
        foreach($fileList as $file)
26
        {
27
            if($file != '.gitignore')
28
            {
29
                $this->info($file);
30
            }
31
        }
32
    }
33
}
34