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

ModelMakeCommand::getStub()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2.0625

Importance

Changes 0
Metric Value
eloc 3
c 0
b 0
f 0
dl 0
loc 7
ccs 3
cts 4
cp 0.75
rs 10
cc 2
nc 2
nop 0
crap 2.0625
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