@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | foreach ($this->results as $results) { |
| 127 | 127 | foreach ($results as $result) { |
| 128 | 128 | /* @var CheckResult $result */ |
| 129 | - $tool = 'Smoke' . $result->getRuleName(); |
|
| 129 | + $tool = 'Smoke'.$result->getRuleName(); |
|
| 130 | 130 | $checks[$tool][] = $result; |
| 131 | 131 | } |
| 132 | 132 | } |
@@ -138,19 +138,19 @@ discard block |
||
| 138 | 138 | continue; |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | - $message = 'The smoke test for #system_name# failed (Rule: ' . $toolName . ').<ul>'; |
|
| 141 | + $message = 'The smoke test for #system_name# failed (Rule: '.$toolName.').<ul>'; |
|
| 142 | 142 | $status = Event::STATUS_SUCCESS; |
| 143 | 143 | $failureCount = 0; |
| 144 | - $identifier = $toolName . '_' . $this->system; |
|
| 144 | + $identifier = $toolName.'_'.$this->system; |
|
| 145 | 145 | |
| 146 | 146 | foreach ($results as $result) { |
| 147 | 147 | /** @var CheckResult $result */ |
| 148 | 148 | if ($result->getStatus() === CheckResult::STATUS_FAILURE) { |
| 149 | 149 | $comingFrom = ''; |
| 150 | 150 | if ($this->addComingFrom && $this->retriever->getComingFrom($result->getResponse()->getUri())) { |
| 151 | - $comingFrom = ', coming from: ' . $this->retriever->getComingFrom($result->getResponse()->getUri()); |
|
| 151 | + $comingFrom = ', coming from: '.$this->retriever->getComingFrom($result->getResponse()->getUri()); |
|
| 152 | 152 | } |
| 153 | - $message .= '<li>' . $result->getMessage() . ' (url: ' . (string)$result->getResponse()->getUri() . $comingFrom . ')</li>'; |
|
| 153 | + $message .= '<li>'.$result->getMessage().' (url: '.(string) $result->getResponse()->getUri().$comingFrom.')</li>'; |
|
| 154 | 154 | ++$failureCount; |
| 155 | 155 | } |
| 156 | 156 | } |
@@ -158,9 +158,9 @@ discard block |
||
| 158 | 158 | $status = Event::STATUS_FAILURE; |
| 159 | 159 | $message .= '</ul>'; |
| 160 | 160 | $firstResult = array_pop($results); |
| 161 | - $attributes[] = new Attribute('html-content', (string)$firstResult->getResponse()->getBody(), true); |
|
| 161 | + $attributes[] = new Attribute('html-content', (string) $firstResult->getResponse()->getBody(), true); |
|
| 162 | 162 | } else { |
| 163 | - $message = 'All checks for system "#system_name#" succeeded [SmokeBasic:' . $toolName . '].'; |
|
| 163 | + $message = 'All checks for system "#system_name#" succeeded [SmokeBasic:'.$toolName.'].'; |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | $this->send($identifier, $this->system, $message, $status, $failureCount, $this->tool, $this->system, $attributes); |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | foreach ($results as $result) { |
| 174 | 174 | /* @var CheckResult $result */ |
| 175 | 175 | |
| 176 | - $identifier = '_' . $this->getIdentifier($result); |
|
| 176 | + $identifier = '_'.$this->getIdentifier($result); |
|
| 177 | 177 | $tool = $this->getPrefix($result->getRuleName()); |
| 178 | 178 | |
| 179 | 179 | $component = $this->getComponent($result->getRuleName()); |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | |
| 182 | 182 | $attributes = array(); |
| 183 | 183 | if ($result->getStatus() == CheckResult::STATUS_FAILURE) { |
| 184 | - $body = (string)$result->getResponse()->getBody(); |
|
| 184 | + $body = (string) $result->getResponse()->getBody(); |
|
| 185 | 185 | if ($body == "") { |
| 186 | 186 | $attributes[] = new Attribute('html content', '<empty>'); |
| 187 | 187 | } else { |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | $this->send( |
| 206 | 206 | $identifier, |
| 207 | 207 | $currentSystem, |
| 208 | - $result->getMessage() . ' (url: ' . (string)$result->getResponse()->getUri() . ')', |
|
| 208 | + $result->getMessage().' (url: '.(string) $result->getResponse()->getUri().')', |
|
| 209 | 209 | $result->getStatus(), |
| 210 | 210 | $result->getValue(), |
| 211 | 211 | $tool, |
@@ -219,12 +219,12 @@ discard block |
||
| 219 | 219 | private function getIdentifier(CheckResult $result) |
| 220 | 220 | { |
| 221 | 221 | if ($this->useUrlAsIdentifier) { |
| 222 | - $suffix = '_' . md5((string)$result->getResponse()->getUri()); |
|
| 222 | + $suffix = '_'.md5((string) $result->getResponse()->getUri()); |
|
| 223 | 223 | } else { |
| 224 | 224 | $suffix = ''; |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | - return $this->tool . '_' . $result->getRuleName() . $suffix; |
|
| 227 | + return $this->tool.'_'.$result->getRuleName().$suffix; |
|
| 228 | 228 | } |
| 229 | 229 | |
| 230 | 230 | private function getPrefix($string) |
@@ -255,8 +255,8 @@ discard block |
||
| 255 | 255 | $this->reporter->sendEvent($event); |
| 256 | 256 | } catch (KoalamonException $e) { |
| 257 | 257 | $this->output->writeln("\n <error> Error sending result to leankoala. </error>"); |
| 258 | - $this->output->writeln(' Url: ' . $e->getUrl()); |
|
| 259 | - $this->output->writeln(' Payload: ' . $e->getPayload()); |
|
| 258 | + $this->output->writeln(' Url: '.$e->getUrl()); |
|
| 259 | + $this->output->writeln(' Payload: '.$e->getPayload()); |
|
| 260 | 260 | $this->output->writeln(""); |
| 261 | 261 | } catch (\Exception $e) { |
| 262 | 262 | $this->output->writeln($e->getMessage()); |