Completed
Push — master ( 6260e5...ab36a7 )
by Elf
03:17
created

IdeHelperGenerateCommand   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 12 3
1
<?php
2
3
namespace ElfSundae\Laravel\Support\Console;
4
5
use Illuminate\Console\Command;
6
7
class IdeHelperGenerateCommand extends Command
8
{
9
    /**
10
     * The name and signature of the console command.
11
     *
12
     * @var string
13
     */
14
    protected $signature = 'support:ide-helper-generate
15
        {--s|standalone : Do not call "clear-compiled" command}';
16
17
    /**
18
     * The console command description.
19
     *
20
     * @var string
21
     */
22
    protected $description = 'Generate new IDE helper files.';
23
24
    /**
25
     * Execute the console command.
26
     *
27
     * @return mixed
28
     */
29
    public function handle()
30
    {
31
        if (! $this->option('standalone')) {
32
            $this->call('clear-compiled');
33
        }
34
35
        if ($this->laravel->bound('command.ide-helper.generate')) {
36
            $this->call('ide-helper:generate');
37
            $this->call('ide-helper:meta');
38
            $this->call('ide-helper:models', ['-N' => true]);
39
        }
40
    }
41
}
42