Conditions | 3 |
Paths | 4 |
Total Lines | 24 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
33 | protected function execute(InputInterface $input, OutputInterface $output) |
||
34 | { |
||
35 | $comodoDecodeCSR = new ComodoDecodeCSR(); |
||
36 | |||
37 | try { |
||
38 | $comodoDecodeCSR->setCSR($this->loadCSR($input, $output)); |
||
39 | $comodoDecodeCSR->fetchHashes(); |
||
40 | } catch (Exception $e) { |
||
41 | $output->writeln('<error>Error!</error>'); |
||
42 | $output->writeln('Invalid CSR'); |
||
43 | |||
44 | return 3; |
||
45 | } |
||
46 | |||
47 | if ($comodoDecodeCSR->checkInstalled()) { |
||
48 | $output->writeln('<info>Success!</info> This domain should pass DVC'); |
||
49 | |||
50 | 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 |