Skip to content

Commit

Permalink
Generate service command parameters changes to standard (#3385)
Browse files Browse the repository at this point in the history
  • Loading branch information
CoyoteRulea authored and jmolivas committed Jul 4, 2017
1 parent d28e6af commit 93ddb2b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/Command/Generate/ServiceCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ protected function configure()
$this->trans('commands.common.service.options.interface')
)
->addOption(
'interface_name',
'interface-name',
null,
InputOption::VALUE_OPTIONAL,
$this->trans('commands.common.service.options.interface_name')
$this->trans('commands.common.service.options.interface-name')
)
->addOption(
'services',
Expand All @@ -121,7 +121,7 @@ protected function configure()
$this->trans('commands.common.options.services')
)
->addOption(
'path_service',
'path-service',
null,
InputOption::VALUE_OPTIONAL,
$this->trans('commands.generate.service.options.path')
Expand All @@ -144,9 +144,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
$name = $input->getOption('name');
$class = $input->getOption('class');
$interface = $input->getOption('interface');
$interface_name = $input->getOption('interface_name');
$interface_name = $input->getOption('interface-name');
$services = $input->getOption('services');
$path_service = $input->getOption('path_service');
$path_service = $input->getOption('path-service');

$available_services = $this->container->getServiceIds();

Expand Down Expand Up @@ -214,12 +214,12 @@ protected function interact(InputInterface $input, OutputInterface $output)
}

// --interface_name option
$interface_name = $input->getOption('interface_name');
$interface_name = $input->getOption('interface-name');
if ($interface && !$interface_name) {
$interface_name = $io->askEmpty(
$this->trans('commands.generate.service.questions.interface_name')
$this->trans('commands.generate.service.questions.interface-name')
);
$input->setOption('interface_name', $interface_name);
$input->setOption('interface-name', $interface_name);
}

// --services option
Expand All @@ -231,13 +231,13 @@ protected function interact(InputInterface $input, OutputInterface $output)
}

// --path_service option
$path_service = $input->getOption('path_service');
$path_service = $input->getOption('path-service');
if (!$path_service) {
$path_service = $io->ask(
$this->trans('commands.generate.service.questions.path'),
'/modules/custom/' . $module . '/src/'
);
$input->setOption('path_service', $path_service);
$input->setOption('path-service', $path_service);
}
}
}

0 comments on commit 93ddb2b

Please sign in to comment.