| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | protected function execute(InputInterface $input, OutputInterface $output): int |
||
| 30 | { |
||
| 31 | $this->initConfiguration($input->getOption('configFile')); |
||
| 32 | |||
| 33 | $file = $input->getArgument('file'); |
||
| 34 | |||
| 35 | if (!file_exists($file)) { |
||
| 36 | $output->writeln('<error>The log file was not found.</error>'); |
||
| 37 | return Command::FAILURE; |
||
| 38 | } |
||
| 39 | |||
| 40 | $this->config->addLogfile($file, $input->getArgument('name')); |
||
| 41 | |||
| 42 | $output->writeln('- Logfile successfully added'); |
||
| 43 | $output->writeln('- Running the collect command to sync with inventorio.cloud'); |
||
| 44 | |||
| 45 | $this->getApplication()->find('collect')->run(new ArrayInput([]), new NullOutput()); |
||
| 46 | |||
| 47 | return Command::SUCCESS; |
||
| 48 | } |
||
| 50 |