MakeCommand   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
eloc 4
dl 0
loc 29
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getDefaultNamespace() 0 3 1
A getNameInput() 0 3 1
A getStub() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * This file is part of Laravel Zero.
7
 *
8
 * (c) Nuno Maduro <[email protected]>
9
 *
10
 *  For the full copyright and license information, please view the LICENSE
11
 *  file that was distributed with this source code.
12
 */
13
14
namespace LaravelZero\Framework\Commands;
15
16
use Illuminate\Foundation\Console\ConsoleMakeCommand;
17
use function ucfirst;
18
19
final class MakeCommand extends ConsoleMakeCommand
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24
    protected $description = 'Create a new command';
25
26
    /**
27
     * {@inheritdoc}
28
     */
29 1
    protected function getNameInput(): string
30
    {
31 1
        return ucfirst(parent::getNameInput());
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37 1
    protected function getStub(): string
38
    {
39 1
        return __DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'console.stub';
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45 1
    protected function getDefaultNamespace($rootNamespace): string
46
    {
47 1
        return $rootNamespace.'\Commands';
48
    }
49
}
50