AuditResolverCommand   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 37
ccs 0
cts 7
cp 0
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getDefaultNamespace() 0 3 1
A getStub() 0 3 1
A handle() 0 4 1
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