| Conditions | 3 |
| Paths | 4 |
| Total Lines | 24 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 3.0327 |
| Changes | 5 | ||
| Bugs | 1 | Features | 2 |
| 1 | <?php |
||
| 33 | 3 | protected function execute(InputInterface $input, OutputInterface $output) |
|
| 34 | { |
||
| 35 | 3 | $comodoDecodeCSR = new ComodoDecodeCSR(); |
|
| 36 | |||
| 37 | try { |
||
| 38 | 3 | $comodoDecodeCSR->setCSR($this->loadCSR($input, $output)); |
|
| 39 | 1 | $comodoDecodeCSR->fetchHashes(); |
|
| 40 | 3 | } catch (Exception $e) { |
|
| 41 | 2 | $output->writeln('<error>Error!</error>'); |
|
| 42 | 2 | $output->writeln('Invalid CSR'); |
|
| 43 | |||
| 44 | 2 | return 3; |
|
| 45 | } |
||
| 46 | |||
| 47 | 1 | if ($comodoDecodeCSR->checkInstalled()) { |
|
| 48 | 1 | $output->writeln('<info>Success!</info> This domain should pass DVC'); |
|
| 49 | |||
| 50 | 1 | return 0; |
|
| 51 | } |
||
| 52 | |||
| 53 | $output->writeln('<error>Fail!</error> There is something wrong with the validation file'); |
||
| 54 | |||
| 55 | return 2; |
||
| 56 | } |
||
| 57 | } |
||
| 58 |