AuditResolverCommand::getStub()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
namespace OwenIt\Auditing\Console;
4
5
use Illuminate\Console\GeneratorCommand;
6
7
class AuditResolverCommand extends GeneratorCommand
8
{
9
    /**
10
     * {@inheritdoc}
11
     */
12
    protected $name = 'auditing:audit-resolver';
13
14
    /**
15
     * {@inheritdoc}
16
     */
17
    protected $description = 'Create a new audit resolver';
18
19
    /**
20
     * {@inheritdoc}
21
     */
22
    protected $type = 'AuditResolver';
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    protected function getStub()
28
    {
29
        return __DIR__ . '/../../stubs/resolver.stub';
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    protected function getDefaultNamespace($rootNamespace)
36
    {
37
        return $rootNamespace . '\AuditResolvers';
38
    }
39
40
    public function handle()
41
    {
42
        $this->info('Add your new resolver to the resolvers array in audit.php config file.');
43
        return parent::handle();
44
    }
45
}
46