Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
32 | protected function execute(InputInterface $input, OutputInterface $output) |
||
33 | { |
||
34 | $comodoDecodeCSR = new ComodoDecodeCSR(); |
||
35 | $comodoDecodeCSR->setCSR($this->loadCSR($input, $output)); |
||
36 | $hashes = $comodoDecodeCSR->fetchHashes(); |
||
37 | |||
38 | if (!$hashes) { |
||
39 | $output->writeln('<error>Fail!</error>'); |
||
40 | $output->writeln('Unable to fetch hashes'); |
||
41 | |||
42 | return 2; |
||
43 | } |
||
44 | |||
45 | $output->writeln('<info>Filename:</info> ' . $hashes['md5'] . '.txt'); |
||
46 | $output->writeln('<info>Contents:</info>'); |
||
47 | $output->writeln($comodoDecodeCSR->generateDVC()); |
||
48 | $output->writeln('<info>URL:</info> http://' . $comodoDecodeCSR->getCN() . '/' . $hashes['md5'] . '.txt'); |
||
49 | |||
50 | return 0; |
||
51 | } |
||
52 | } |
||
53 |