Passed
Push — dev5 ( 0d97ef...978ab8 )
by Ron
08:29
created

backupList::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
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