ClearAssetsCommand::getArguments()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
use Illuminate\Console\Command;
4
5
class ClearAssetsCommand extends Command
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
6
{
7
    /**
8
     * The console command name.
9
     *
10
     * @var string
11
     */
12
    protected $name = 'assets:clear';
13
14
    /**
15
     * The console command description.
16
     *
17
     * @var string
18
     */
19
    protected $description = 'Remove generated assets automatically';
20
21
    /**
22
     * Execute the console command.
23
     *
24
     * @return void
25
     */
26
    public function fire()
27
    {
28
        File::deleteDirectory(public_path().'/assets');
29
        $this->info('Assets cleared!');
30
    }
31
32
    /**
33
     * Get the console command arguments.
34
     *
35
     * @return array
36
     */
37
    protected function getArguments()
38
    {
39
        return [];
40
    }
41
42
    /**
43
     * Get the console command options.
44
     *
45
     * @return array
46
     */
47
    protected function getOptions()
48
    {
49
        return [];
50
    }
51
}
52