Total Complexity | 4 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 75% |
Changes | 0 |
1 | <?php |
||
9 | class ModelMakeCommand extends IlluminateModelMakeCommand |
||
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 | 1 | * @return string |
|
22 | */ |
||
23 | 1 | protected function getStub() |
|
24 | { |
||
25 | return $this->option('pivot') |
||
26 | ? $this->resolveStubPath('/../../stubs/pivot.model.stub') |
||
27 | 1 | : $this->resolveStubPath('/../../stubs/model.stub'); |
|
28 | } |
||
29 | |||
30 | /** |
||
31 | * Resolve the fully-qualified path to the stub. |
||
32 | * |
||
33 | * This method is an exact copy of the original to keep the functionality but reroute __DIR__ |
||
34 | * |
||
35 | * @param string $stub |
||
36 | * @return string |
||
37 | */ |
||
38 | protected function resolveStubPath($stub) |
||
43 | } |
||
44 | } |
||
45 |