Passed
Push — master ( 4e43a8...07b874 )
by Zhengchao
02:33
created

RequestMakeCommand::getDefaultNamespace()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
3
/*
4
 * This file is part of emanci/lumen-request package.
5
 *
6
 * (c) emanci <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Emanci\LumenRequest\Console;
13
14
class RequestMakeCommand extends GeneratorCommand
15
{
16
    /**
17
     * The console command name.
18
     *
19
     * @var string
20
     */
21
    protected $name = 'make:request';
22
23
    /**
24
     * The console command description.
25
     *
26
     * @var string
27
     */
28
    protected $description = 'Create a new form request class';
29
30
    /**
31
     * The type of class being generated.
32
     *
33
     * @var string
34
     */
35
    protected $type = 'Request';
36
37
    /**
38
     * Get the stub file for the generator.
39
     *
40
     * @return string
41
     */
42
    protected function getStub()
43
    {
44
        return __DIR__.'/stubs/make/request.stub';
45
    }
46
47
    /**
48
     * Get the default namespace for the class.
49
     *
50
     * @param string $rootNamespace
51
     *
52
     * @return string
53
     */
54
    protected function getDefaultNamespace($rootNamespace)
55
    {
56
        return $rootNamespace.'\Http\Requests';
57
    }
58
}
59