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

backupList   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 25%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 12
dl 0
loc 22
ccs 3
cts 12
cp 0.25
rs 10
c 1
b 0
f 0
wmc 4

2 Methods

Rating   Name   Duplication   Size   Complexity  
A handle() 0 12 3
A __construct() 0 3 1
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