Test Setup Failed
Pull Request — master (#3)
by
unknown
05:02
created

TruncateQuotaLog   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 36
rs 10
c 0
b 0
f 0
ccs 3
cts 6
cp 0.5

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A handle() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of laravel-quota
5
 *
6
 * (c) David Faith <[email protected]>
7
 *
8
 * Full copyright and license information is available
9
 * in the LICENSE file distributed with this source code.
10
 */
11
12
namespace Projectmentor\Quota\Console\Commands;
13
14
use Illuminate\Console\Command;
15
use DB;
16
17
class TruncateQuotaLog extends Command
18
{
19
    /**
20
     * The name and signature of the console command.
21
     *
22
     * @var string
23
     */
24
    protected $signature = 'quota:truncate';
25
26
    /**
27
     * The console command description.
28
     *
29
     * @var string
30
     */
31
    protected $description = 'Truncate the quotalog table.';
32
33
    /**
34
     * Create a new command instance.
35
     *
36
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
37
     */
38 8
    public function __construct()
39
    {
40 8
        parent::__construct();
41 8
    }
42
43
    /**
44
     * Execute the console command.
45
     *
46
     * @return mixed
47
     */
48
    public function handle()
49
    {
50
        DB::table('quotalog')->delete();
51
    }
52
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
53