1 | <?php |
||
16 | class NewCommand extends Command |
||
17 | { |
||
18 | |||
19 | /** |
||
20 | * |
||
21 | */ |
||
22 | 15 | protected function configure() |
|
23 | { |
||
24 | 15 | $this |
|
25 | 15 | ->setName('new') |
|
26 | 15 | ->setDescription('Generates a new project') |
|
27 | 15 | ->addArgument( |
|
28 | 15 | 'bootstrap', |
|
29 | 15 | InputArgument::OPTIONAL, |
|
30 | 'package name' |
||
31 | 15 | ) |
|
32 | 15 | ->addArgument( |
|
33 | 15 | 'version', |
|
34 | 15 | InputArgument::OPTIONAL, |
|
35 | 'package version' |
||
36 | 15 | ) |
|
37 | 15 | ->addArgument( |
|
38 | 15 | 'source', |
|
39 | 15 | InputArgument::OPTIONAL, |
|
40 | 'package source' |
||
41 | 15 | ) |
|
42 | 15 | ->addOption( |
|
43 | 15 | 'dir', |
|
44 | 15 | 'd', |
|
45 | 15 | InputOption::VALUE_REQUIRED, |
|
46 | 'Specify a custom directory path for the project. By default, project will be installed in the same directory as the project name.' |
||
|
|||
47 | 15 | ) |
|
48 | 15 | ->addOption( |
|
49 | 15 | 'no-module', |
|
50 | 15 | 'm', |
|
51 | 15 | InputOption::VALUE_NONE, |
|
52 | 'Avoid to run the modules' |
||
53 | 15 | ) |
|
54 | 15 | ->setHelp(file_get_contents($this->getService('config')['doc.path'].'new.console')); |
|
55 | 15 | } |
|
56 | |||
57 | /** |
||
58 | * @param InputInterface $input |
||
59 | * @param OutputInterface $output |
||
60 | * @return void |
||
61 | */ |
||
62 | 2 | protected function execute(InputInterface $input, OutputInterface $output) |
|
70 | |||
71 | /** |
||
72 | * @return \Samurai\Task\ITask |
||
73 | */ |
||
74 | 2 | private function getTask() |
|
79 | } |
||
80 | |||
81 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.