ReportMakeCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 44
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
declare(strict_types=1);
3
4
namespace agoalofalife\Reports\Console;
5
6
7
use Illuminate\Console\GeneratorCommand;
8
9
class ReportMakeCommand extends GeneratorCommand
10
{
11
    /**
12
     * The console command name.
13
     *
14
     * @var string
15
     */
16
    protected $name = 'make:report';
17
18
    /**
19
     * The console command description.
20
     *
21
     * @var string
22
     */
23
    protected $description = 'Create a new Report class';
24
25
    /**
26
     * The type of class being generated.
27
     *
28
     * @var string
29
     */
30
    protected $type = 'Report';
31
32
    /**
33
     * Get the stub file for the generator.
34
     *
35
     * @return string
36
     */
37
    protected function getStub()
38
    {
39
        return __DIR__.'/stubs/report.stub';
40
    }
41
42
    /**
43
     * Get the default namespace for the class.
44
     *
45
     * @param  string  $rootNamespace
46
     * @return string
47
     */
48
    protected function getDefaultNamespace($rootNamespace)
49
    {
50
        return $rootNamespace.'\Reports';
51
    }
52
}