@@ -67,6 +67,9 @@ |
||
67 | 67 | return md5(json_encode((string)$uri) . json_encode($headers)); |
68 | 68 | } |
69 | 69 | |
70 | + /** |
|
71 | + * @param string $key |
|
72 | + */ |
|
70 | 73 | private function cacheResponse($key, Response $response) |
71 | 74 | { |
72 | 75 | $serializedResponse = $this->serializeResponse($response); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | */ |
42 | 42 | private function serializeResponse(Response $response) |
43 | 43 | { |
44 | - $array = ['object' => serialize($response), 'body' => (string)$response->getBody()]; |
|
44 | + $array = ['object' => serialize($response), 'body' => (string) $response->getBody()]; |
|
45 | 45 | return serialize($array); |
46 | 46 | } |
47 | 47 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | private function getHash($uri, $headers) |
66 | 66 | { |
67 | - return md5(json_encode((string)$uri) . json_encode($headers)); |
|
67 | + return md5(json_encode((string) $uri).json_encode($headers)); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | private function cacheResponse($key, Response $response) |
@@ -58,10 +58,10 @@ discard block |
||
58 | 58 | */ |
59 | 59 | protected function writeSmokeCredentials($url = null) |
60 | 60 | { |
61 | - $this->output->writeln("\n Smoke " . SMOKE_VERSION . " by Nils Langner\n"); |
|
61 | + $this->output->writeln("\n Smoke ".SMOKE_VERSION." by Nils Langner\n"); |
|
62 | 62 | |
63 | 63 | if ($url) { |
64 | - $this->output->writeln(' <info>Scanning ' . $url . "</info>\n"); |
|
64 | + $this->output->writeln(' <info>Scanning '.$url."</info>\n"); |
|
65 | 65 | } |
66 | 66 | } |
67 | 67 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $httpClient->disableCache(); |
128 | 128 | } |
129 | 129 | |
130 | - $fileContent = (string)$httpClient->get($configFile)->getBody(); |
|
130 | + $fileContent = (string) $httpClient->get($configFile)->getBody(); |
|
131 | 131 | |
132 | 132 | if ($httpClient instanceof CacheAware) { |
133 | 133 | $httpClient->enableCache(); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | if (file_exists($configFile)) { |
137 | 137 | $fileContent = file_get_contents($configFile); |
138 | 138 | } else { |
139 | - throw new \RuntimeException("Config file was not found ('" . $configFile . "')."); |
|
139 | + throw new \RuntimeException("Config file was not found ('".$configFile."')."); |
|
140 | 140 | } |
141 | 141 | } |
142 | 142 | $configArray = EnvAwareYaml::parse($fileContent); |