CompileCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 31
ccs 0
cts 9
cp 0
rs 10
c 1
b 0
f 0
wmc 2
lcom 1
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 9 2
1
<?php
2
/*
3
 * This file is part of the Laravel Platfourm package.
4
 *
5
 * (c) Avtandil Kikabidze aka LONGMAN <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Longman\Platfourm\Foundation\Console;
12
13
use Longman\Platfourm\Console\Command;
14
15
class CompileCommand extends Command
16
{
17
    /**
18
     * The name and signature of the console command.
19
     *
20
     * @var string
21
     */
22
    protected $signature = 'compile';
23
24
    /**
25
     * The console command description.
26
     *
27
     * @var string
28
     */
29
    protected $description = 'Caches and optimizes everything';
30
31
    /**
32
     * Execute the console command.
33
     *
34
     * @return mixed
35
     */
36
    public function handle()
37
    {
38
        $this->call('clear-compiled');
39
        if (!$this->laravel['config']['app.debug']) {
40
            $this->call('optimize', ['--force' => true]);
41
            $this->call('config:cache');
42
            $this->call('route:cache');
43
        }
44
    }
45
}
46