Completed
Push — master ( a61b3b...89deac )
by Bas
03:01
created

ModelAranguentCommand::getStub()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
eloc 3
c 1
b 1
f 1
dl 0
loc 7
rs 10
cc 2
nc 2
nop 0
1
<?
0 ignored issues
show
Security Best Practice introduced by
It is not recommended to use PHP's short opening tag <?, better use <?php, or <?= in case of outputting.

Short opening tags are disabled in PHP?s default configuration. In such a case, all content of this file is output verbatim to the browser without being parsed, or executed.

As a precaution to avoid these problems better use the long opening tag <?php.

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