Completed
Push — master ( 5c52b8...379248 )
by ARCANEDEV
03:49
created

ClearCommand::handle()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 14
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 9
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 14
ccs 0
cts 13
cp 0
crap 6
rs 9.4285
1
<?php namespace Arcanesoft\Foundation\Console;
2
3
/**
4
 * Class     ClearCommand
5
 *
6
 * @package  Arcanesoft\Foundation\Console
7
 * @author   ARCANEDEV <[email protected]>
8
 */
9
class ClearCommand extends Command
10
{
11
    /* ------------------------------------------------------------------------------------------------
12
     |  Properties
13
     | ------------------------------------------------------------------------------------------------
14
     */
15
    /**
16
     * The name and signature of the console command.
17
     *
18
     * @var string
19
     */
20
    protected $signature = 'foundation:clear';
21
22
    /**
23
     * The console command description.
24
     *
25
     * @var string
26
     */
27
    protected $description = 'Remove the compiled class/view files, flush the application cache and remove the route/configuration cache files.';
28
29
    /**
30
     * Execute the console command.
31
     */
32
    public function handle()
33
    {
34
        $commands = [
35
            'clear-compiled',
36
            'cache:clear',
37
            'config:clear',
38
            'route:clear',
39
            'view:clear',
40
        ];
41
42
        foreach ($commands as $command) {
43
            $this->call($command);
44
        }
45
    }
46
}
47