| Total Complexity | 4 |
| Total Lines | 59 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class GraphQLQueryGeneratorCommand extends BaseCommand |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * The console command name. |
||
| 13 | * |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | protected $name = 'artomator.graphql:query'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * The console command description. |
||
| 20 | * |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | protected $description = 'Create a GraphQL query 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 | $queryGenerator = new GraphQLQueryGenerator($this->commandData); |
||
| 45 | $queryGenerator->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() |
||
| 68 | } |
||
| 69 | } |
||
| 70 |