Passed
Push — next ( ff9bff...02eaaa )
by Bas
03:36
created

ModelMakeCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
wmc 2
eloc 5
c 0
b 0
f 0
dl 0
loc 21
ccs 3
cts 4
cp 0.75
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getStub() 0 7 2
1
<?php
2
3
namespace LaravelFreelancerNL\Aranguent\Console;
4
5
use Illuminate\Foundation\Console\ModelMakeCommand as IlluminateModelMakeCommand;
6
7
class ModelMakeCommand extends IlluminateModelMakeCommand
8
{
9
    /**
10
     * The console command name.
11
     *
12
     * @var string
13
     */
14
    protected $name = 'aranguent:model';
15
16
    /**
17
     * Get the stub file for the generator.
18
     *
19
     * @return string
20
     */
21 1
    protected function getStub()
22
    {
23 1
        if ($this->option('pivot')) {
24
            return __DIR__ . '/stubs/pivot.model.stub';
25
        }
26
27 1
        return __DIR__ . '/stubs/model.stub';
28
    }
29
}
30