Passed
Push — main ( 83c63f...43105b )
by mohsen
10:48 queued 07:59
created

CleanupCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
dl 0
loc 24
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 3 1
1
<?php
2
3
namespace MohsenAbrishami\Stethoscope\Commands;
4
use MohsenAbrishami\Stethoscope\LogRecord\Facades\Record;
5
6
use Illuminate\Console\Command;
7
8
class CleanupCommand extends Command
9
{
10
    /**
11
     * The name and signature of the console command.
12
     *
13
     * @var string
14
     */
15
    protected $signature = 'stethoscope:clean';
16
17
    /**
18
     * The console command description.
19
     *
20
     * @var string
21
     */
22
    protected $description = 'Delete all resource logs older than specified number of days in config.';
23
24
    /**
25
     * Execute the console command.
26
     *
27
     * @return int
28
     */
29
    public function handle()
30
    {
31
        Record::clean();
0 ignored issues
show
Bug introduced by
The method clean() does not exist on MohsenAbrishami\Stethosc...ogRecord\Facades\Record. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

31
        Record::/** @scrutinizer ignore-call */ 
32
                clean();
Loading history...
32
    }
33
}
34