Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | protected function execute(InputInterface $input, OutputInterface $output) |
||
29 | { |
||
30 | $name = $input->getArgument('name'); |
||
31 | $path = $input->getArgument('path'); |
||
32 | $cfg = $this->getSelimConfig($input); |
||
33 | |||
34 | if (!$cfg->siteExists($name)) { |
||
35 | $cfg->addSite($name, $path); |
||
36 | $cfg->write(); |
||
37 | echo "added: '$name'".PHP_EOL; |
||
38 | } else { |
||
39 | echo "Site with name '$name' already exists!".PHP_EOL; |
||
40 | } |
||
41 | } |
||
42 | } |