Completed
Push — master ( d74d5b...e3c7fa )
by Nekrasov
01:42
created

MakeAnonymizerCommand::qualifyClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Arrilot\LaravelDataAnonymization\Commands;
4
5
use Illuminate\Support\Composer;
6
use Illuminate\Filesystem\Filesystem;
7
use Illuminate\Console\GeneratorCommand;
8
9
class MakeAnonymizerCommand extends GeneratorCommand
10
{
11
    /**
12
     * The console command name.
13
     *
14
     * @var string
15
     */
16
    protected $name = 'make:anonymizer';
17
18
    /**
19
     * The console command description.
20
     *
21
     * @var string
22
     */
23
    protected $description = 'Create a new anonymizer class';
24
25
    /**
26
     * The type of class being generated.
27
     *
28
     * @var string
29
     */
30
    protected $type = 'Anonymizer';
31
32
    /**
33
     * Execute the console command.
34
     *
35
     * @return void
36
     */
37
    public function handle()
38
    {
39
        parent::handle();
40
    }
41
42
    /**
43
     * Get the stub file for the generator.
44
     *
45
     * @return string
46
     */
47
    protected function getStub()
48
    {
49
        return __DIR__.'/stubs/anonymizer.stub';
50
    }
51
52
    /**
53
     * Get the destination class path.
54
     *
55
     * @param  string  $name
56
     * @return string
57
     */
58
    protected function getPath($name)
59
    {
60
        return $this->laravel->databasePath().'/anonymization/'.$name.'.php';
61
    }
62
63
    /**
64
     * Parse the class name and format according to the root namespace.
65
     *
66
     * @param  string  $name
67
     * @return string
68
     */
69
    protected function qualifyClass($name)
70
    {
71
        return $name;
72
    }
73
}
74