Passed
Push — master ( b4d23a...a4c2d0 )
by Zhengchao
07:42
created

RequestMakeCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 45
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getStub() 0 4 1
A getDefaultNamespace() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of questocat/lumen-request package.
5
 *
6
 * (c) questocat <[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 Questocat\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 input 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