@@ -36,8 +36,8 @@ |
||
| 36 | 36 | $hashes = $comodoDecodeCSR->fetchHashes(); |
| 37 | 37 | |
| 38 | 38 | if ($hashes) { |
| 39 | - $output->writeln('<info>MD5</info> ' . $hashes['md5']); |
|
| 40 | - $output->writeln('<info>SHA1</info> ' . $hashes['sha1']); |
|
| 39 | + $output->writeln('<info>MD5</info> '.$hashes['md5']); |
|
| 40 | + $output->writeln('<info>SHA1</info> '.$hashes['sha1']); |
|
| 41 | 41 | |
| 42 | 42 | return 0; |
| 43 | 43 | } |
@@ -42,10 +42,10 @@ |
||
| 42 | 42 | return 2; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - $output->writeln('<info>Filename:</info> ' . $hashes['md5'] . '.txt'); |
|
| 45 | + $output->writeln('<info>Filename:</info> '.$hashes['md5'].'.txt'); |
|
| 46 | 46 | $output->writeln('<info>Contents:</info>'); |
| 47 | 47 | $output->writeln($comodoDecodeCSR->generateDVC()); |
| 48 | - $output->writeln('<info>URL:</info> http://' . $comodoDecodeCSR->getCN() . '/' . $hashes['md5'] . '.txt'); |
|
| 48 | + $output->writeln('<info>URL:</info> http://'.$comodoDecodeCSR->getCN().'/'.$hashes['md5'].'.txt'); |
|
| 49 | 49 | |
| 50 | 50 | return 0; |
| 51 | 51 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | |
| 21 | 21 | public function setUp() |
| 22 | 22 | { |
| 23 | - register_shutdown_function(function () { |
|
| 23 | + register_shutdown_function(function() { |
|
| 24 | 24 | if (file_exists('test.csr')) { |
| 25 | 25 | unlink('test.csr'); |
| 26 | 26 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | public function setUp() |
| 22 | 22 | { |
| 23 | - register_shutdown_function(function () { |
|
| 23 | + register_shutdown_function(function() { |
|
| 24 | 24 | if (file_exists('test.csr')) { |
| 25 | 25 | unlink('test.csr'); |
| 26 | 26 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $tester = new CommandTester($command); |
| 63 | 63 | |
| 64 | 64 | //Create an empty |
| 65 | - file_put_contents('test.csr', ' ' . $this->createFakeCSR(), FILE_APPEND | LOCK_EX); |
|
| 65 | + file_put_contents('test.csr', ' '.$this->createFakeCSR(), FILE_APPEND | LOCK_EX); |
|
| 66 | 66 | |
| 67 | 67 | $tester->execute([ |
| 68 | 68 | 'csr' => 'test.csr' |
@@ -126,7 +126,7 @@ |
||
| 126 | 126 | |
| 127 | 127 | /** |
| 128 | 128 | * |
| 129 | - * @param GuzzleHttp\Psr7\Response $response |
|
| 129 | + * @param Response $response |
|
| 130 | 130 | * @return bool |
| 131 | 131 | */ |
| 132 | 132 | public function checkDVC(Response $response) |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | public function generateDVC() |
| 120 | 120 | { |
| 121 | - $DVC = $this->getSHA1() . "\n"; |
|
| 121 | + $DVC = $this->getSHA1()."\n"; |
|
| 122 | 122 | $DVC .= "comodoca.com\n"; |
| 123 | 123 | |
| 124 | 124 | return $DVC; |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | */ |
| 132 | 132 | public function checkDVC(Response $response) |
| 133 | 133 | { |
| 134 | - $body = $response->getBody() . ''; |
|
| 134 | + $body = $response->getBody().''; |
|
| 135 | 135 | $DVC = $this->generateDVC(); |
| 136 | 136 | |
| 137 | 137 | //Check if we received a 301 or 302 redirect |
@@ -146,13 +146,13 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | //Check if last 2 characters are new lines |
| 148 | 148 | if (substr($body, -2) === "\n\n") { |
| 149 | - $body = substr($body, 0, -2) . "\n"; |
|
| 149 | + $body = substr($body, 0, -2)."\n"; |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | //Check if last character is not a new line |
| 153 | 153 | if (substr($body, -1) !== "\n") { |
| 154 | 154 | //Add said new line |
| 155 | - $body = $body . "\n"; |
|
| 155 | + $body = $body."\n"; |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | var_dump($body, $DVC); |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | $protocol = 'https://'; |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | - $url = $protocol . $domain . "/" . $this->getMD5() . '.txt'; |
|
| 216 | + $url = $protocol.$domain."/".$this->getMD5().'.txt'; |
|
| 217 | 217 | |
| 218 | 218 | $client = new Client(['allow_redirects' => false, 'verify' => false]); |
| 219 | 219 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | { |
| 27 | 27 | $csrFile = $input->getArgument('csr'); |
| 28 | 28 | if (!file_exists($csrFile)) { |
| 29 | - $output->writeln('<error>Unable to load '. $csrFile .'</error>'); |
|
| 29 | + $output->writeln('<error>Unable to load '.$csrFile.'</error>'); |
|
| 30 | 30 | $output->writeln('<error>Please check the path and try again</error>'); |
| 31 | 31 | |
| 32 | 32 | exit(); |