MakeCommand::getDefaultNamespace()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace BeyondCode\LaravelPackageTools\Commands;
4
5
class MakeCommand extends GeneratorCommand
6
{
7
    protected $type = 'Command';
8
9
    protected function replaceClass($stub, $name)
10
    {
11
        $stub = parent::replaceClass($stub, $name);
12
13
        return str_replace('dummy:command', $this->option('command', 'command:name'), $stub);
14
    }
15
16
    protected function getStub()
17
    {
18
        return __DIR__.'/stubs/console.stub';
19
    }
20
21
    protected function getDefaultNamespace($rootNamespace): string
22
    {
23
        return $rootNamespace.'\Console\Commands';
24
    }
25
}
26