@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | foreach ($this->results as $results) { |
129 | 129 | foreach ($results as $result) { |
130 | 130 | /* @var CheckResult $result */ |
131 | - $tool = 'Smoke' . $result->getRuleName(); |
|
131 | + $tool = 'Smoke'.$result->getRuleName(); |
|
132 | 132 | $checks[$tool][] = $result; |
133 | 133 | } |
134 | 134 | } |
@@ -140,19 +140,19 @@ discard block |
||
140 | 140 | continue; |
141 | 141 | } |
142 | 142 | |
143 | - $message = 'The smoke test for #system_name# failed (Rule: ' . $toolName . ').<ul>'; |
|
143 | + $message = 'The smoke test for #system_name# failed (Rule: '.$toolName.').<ul>'; |
|
144 | 144 | $status = Event::STATUS_SUCCESS; |
145 | 145 | $failureCount = 0; |
146 | - $identifier = $toolName . '_' . $this->system; |
|
146 | + $identifier = $toolName.'_'.$this->system; |
|
147 | 147 | |
148 | 148 | foreach ($results as $result) { |
149 | 149 | /** @var CheckResult $result */ |
150 | 150 | if ($result->getStatus() === CheckResult::STATUS_FAILURE) { |
151 | 151 | $comingFrom = ''; |
152 | 152 | if ($this->addComingFrom && $this->retriever->getComingFrom($result->getResponse()->getUri())) { |
153 | - $comingFrom = ', coming from: ' . $this->retriever->getComingFrom($result->getResponse()->getUri()); |
|
153 | + $comingFrom = ', coming from: '.$this->retriever->getComingFrom($result->getResponse()->getUri()); |
|
154 | 154 | } |
155 | - $message .= '<li>' . $result->getMessage() . ' (url: ' . (string)$result->getResponse()->getUri() . $comingFrom . ')</li>'; |
|
155 | + $message .= '<li>'.$result->getMessage().' (url: '.(string) $result->getResponse()->getUri().$comingFrom.')</li>'; |
|
156 | 156 | ++$failureCount; |
157 | 157 | } |
158 | 158 | } |
@@ -163,12 +163,12 @@ discard block |
||
163 | 163 | $response = $firstResult->getResponse(); |
164 | 164 | /** @var ResponseInterface $response */ |
165 | 165 | |
166 | - $attributes[] = new Attribute('html-content', (string)$response->getBody(), true); |
|
166 | + $attributes[] = new Attribute('html-content', (string) $response->getBody(), true); |
|
167 | 167 | if ($response instanceof TimeoutAwareResponse) { |
168 | 168 | $attributes[] = new Attribute('timeout', $response->isTimeout()); |
169 | 169 | } |
170 | 170 | } else { |
171 | - $message = 'All checks for system "#system_name#" succeeded [SmokeBasic:' . $toolName . '].'; |
|
171 | + $message = 'All checks for system "#system_name#" succeeded [SmokeBasic:'.$toolName.'].'; |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | $this->send($identifier, $this->system, $message, $status, $failureCount, $this->tool, $this->system, $attributes); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | foreach ($results as $result) { |
182 | 182 | /* @var CheckResult $result */ |
183 | 183 | |
184 | - $identifier = '_' . $this->getIdentifier($result); |
|
184 | + $identifier = '_'.$this->getIdentifier($result); |
|
185 | 185 | $tool = $this->getPrefix($result->getRuleName()); |
186 | 186 | |
187 | 187 | $component = $this->getComponent($result->getRuleName()); |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | |
190 | 190 | $attributes = array(); |
191 | 191 | if ($result->getStatus() == CheckResult::STATUS_FAILURE) { |
192 | - $body = (string)$result->getResponse()->getBody(); |
|
192 | + $body = (string) $result->getResponse()->getBody(); |
|
193 | 193 | if ($body == "") { |
194 | 194 | $attributes[] = new Attribute('html content', '<empty>'); |
195 | 195 | } else { |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | $this->send( |
214 | 214 | $identifier, |
215 | 215 | $currentSystem, |
216 | - $result->getMessage() . ' (url: ' . (string)$result->getResponse()->getUri() . ')', |
|
216 | + $result->getMessage().' (url: '.(string) $result->getResponse()->getUri().')', |
|
217 | 217 | $result->getStatus(), |
218 | 218 | $result->getValue(), |
219 | 219 | $tool, |
@@ -228,12 +228,12 @@ discard block |
||
228 | 228 | private function getIdentifier(CheckResult $result) |
229 | 229 | { |
230 | 230 | if ($this->useUrlAsIdentifier) { |
231 | - $suffix = '_' . md5((string)$result->getResponse()->getUri()); |
|
231 | + $suffix = '_'.md5((string) $result->getResponse()->getUri()); |
|
232 | 232 | } else { |
233 | 233 | $suffix = ''; |
234 | 234 | } |
235 | 235 | |
236 | - return $this->tool . '_' . $result->getRuleName() . $suffix; |
|
236 | + return $this->tool.'_'.$result->getRuleName().$suffix; |
|
237 | 237 | } |
238 | 238 | |
239 | 239 | private function getPrefix($string) |
@@ -265,8 +265,8 @@ discard block |
||
265 | 265 | $this->reporter->sendEvent($event); |
266 | 266 | } catch (KoalamonException $e) { |
267 | 267 | $this->output->writeln("\n <error> Error sending result to leankoala. </error>"); |
268 | - $this->output->writeln(' Url: ' . $e->getUrl()); |
|
269 | - $this->output->writeln(' Payload: ' . $e->getPayload()); |
|
268 | + $this->output->writeln(' Url: '.$e->getUrl()); |
|
269 | + $this->output->writeln(' Payload: '.$e->getPayload()); |
|
270 | 270 | $this->output->writeln(""); |
271 | 271 | } catch (\Exception $e) { |
272 | 272 | $this->output->writeln($e->getMessage()); |