Completed
Push — master ( 8c9c54...6d4889 )
by Elf
44:15
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 2
Bugs 0 Features 0
Metric Value
wmc 3
c 2
b 0
f 0
lcom 1
cbo 2
dl 0
loc 35
ccs 0
cts 11
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 12 3
1
<?php
2
3
namespace ElfSundae\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
        {--p|pure : 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('pure')) {
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:models', ['--nowrite' => true]);
38
            $this->call('ide-helper:meta');
39
        }
40
    }
41
}
42