Passed
Push — master ( 48aa9a...5ad1d2 )
by Richard
10:34
created

RepositoryGeneratorCommand::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 6
c 2
b 0
f 0
dl 0
loc 11
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace PWWEB\Artomator\Commands\Common;
4
5
use InfyOm\Generator\Commands\Common\RepositoryGeneratorCommand as Base;
6
use PWWEB\Artomator\Common\CommandData;
7
use PWWEB\Artomator\Generators\InterfaceGenerator;
8
use PWWEB\Artomator\Generators\RepositoryGenerator;
9
10
class RepositoryGeneratorCommand extends Base
11
{
12
    /**
13
     * The console command name.
14
     *
15
     * @var string
16
     */
17
    protected $name = 'artomator:repository';
18
19
    /**
20
     * Create a new command instance.
21
     */
22
    public function __construct()
23
    {
24
        parent::__construct();
25
26
        $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);
27
    }
28
29
    /**
30
     * Execute the command.
31
     *
32
     * @return void
33
     */
34
    public function handle()
35
    {
36
        parent::handle();
37
38
        $repositoryGenerator = new RepositoryGenerator($this->commandData);
39
        $repositoryGenerator->generate();
40
41
        $interfaceGenerator = new InterfaceGenerator($this->commandData);
42
        $interfaceGenerator->generate();
43
44
        $this->performPostActions();
45
    }
46
}
47