CleanActivityLogCommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 6 1
1
<?php
2
namespace LaiVu\ActivityLog\Commands;
3
use Illuminate\Console\Command;
4
5
/**
6
 * Created by PhpStorm.
7
 * User: Lai Vu
8
 * Date: 10/25/2016
9
 * Time: 9:53 AM
10
 */
11
class CleanActivityLogCommand extends Command
12
{
13
    /**
14
     * The console command name.
15
     *
16
     * @var string
17
     */
18
    protected $signature = 'activitylog:clean';
19
20
    /**
21
     * The console command description.
22
     *
23
     * @var string
24
     */
25
    protected $description = 'Clean up old records from the activity log.';
26
    public function handle()
27
    {
28
        $this->comment('Cleaning activity log...');
29
        app('activitylog')->cleanLog();
30
        $this->comment('All done!');
31
    }
32
}