1 | <?php |
||
15 | class StartServer extends Command |
||
16 | { |
||
17 | const CLI_COMMAND = 'start'; |
||
18 | |||
19 | /** |
||
20 | * Configure the command options. |
||
21 | * |
||
22 | * @return void |
||
23 | */ |
||
24 | protected function configure() |
||
|
|||
25 | { |
||
26 | $defaultName = basename(Config::DEFAULT_CONFIGURATION_FILENAME, '.json'); |
||
27 | |||
28 | $this |
||
29 | ->setName(self::CLI_COMMAND) |
||
30 | ->setDescription('Start Selenium Server setup with all supported drivers attached to it.') |
||
31 | ->addArgument('name', InputArgument::OPTIONAL, 'The instance name.', $defaultName) |
||
32 | ->addOption('config', 'c', InputOption::VALUE_OPTIONAL, 'The config path.'); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Execute the command. |
||
37 | * |
||
38 | * @param \Symfony\Component\Console\Input\InputInterface $input |
||
39 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
||
40 | * @return void |
||
41 | */ |
||
42 | protected function execute(InputInterface $input, OutputInterface $output) |
||
71 | |||
72 | } |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.