GraphQLSubscriptionGeneratorCommand::getOptions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace PWWEB\Artomator\Commands\GraphQL;
4
5
use PWWEB\Artomator\Commands\BaseCommand;
6
use PWWEB\Artomator\Common\CommandData;
7
use PWWEB\Artomator\Generators\GraphQL\GraphQLSubscriptionGenerator;
8
9
class GraphQLSubscriptionGeneratorCommand extends BaseCommand
10
{
11
    /**
12
     * The console command name.
13
     *
14
     * @var string
15
     */
16
    protected $name = 'artomator.graphql:subscription';
17
18
    /**
19
     * The console command description.
20
     *
21
     * @var string
22
     */
23
    protected $description = 'Create a GraphQL subscription command';
24
25
    /**
26
     * Create a new command instance.
27
     */
28
    public function __construct()
29
    {
30
        parent::__construct();
31
32
        $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_GRAPHQL);
33
    }
34
35
    /**
36
     * Execute the command.
37
     *
38
     * @return void
39
     */
40
    public function handle()
41
    {
42
        parent::handle();
43
44
        $apiSubscriptionGenerator = new GraphQLSubscriptionGenerator($this->commandData);
45
        $apiSubscriptionGenerator->generate();
46
47
        $this->performPostActions();
48
    }
49
50
    /**
51
     * Get the console command options.
52
     *
53
     * @return array
54
     */
55
    public function getOptions()
56
    {
57
        return array_merge(parent::getOptions(), []);
58
    }
59
60
    /**
61
     * Get the console command arguments.
62
     *
63
     * @return array
64
     */
65
    protected function getArguments()
66
    {
67
        return array_merge(parent::getArguments(), []);
68
    }
69
}
70