Completed
Push — master ( 8ec94e...9abf36 )
by Nils
02:18
created
src/Extensions/SmokeReporter/Reporter/CliReporter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,19 +30,19 @@
 block discarded – undo
30 30
 
31 31
     protected function renderFailure(CheckResult $result)
32 32
     {
33
-        $this->output->writeln('   <error> ' . (string) $result->getResponse()->getUri() . ' </error> coming from ' . (string) $this->retriever->getComingFrom($result->getResponse()->getUri()));
34
-        $this->output->writeln('    - ' . $result->getMessage() . ' [rule: ' . $result->getRuleName() . ']');
33
+        $this->output->writeln('   <error> '.(string) $result->getResponse()->getUri().' </error> coming from '.(string) $this->retriever->getComingFrom($result->getResponse()->getUri()));
34
+        $this->output->writeln('    - '.$result->getMessage().' [rule: '.$result->getRuleName().']');
35 35
         $this->output->writeln('');
36 36
     }
37 37
 
38 38
     protected function renderSuccess(CheckResult $result)
39 39
     {
40
-        $this->output->writeln('   <info> ' . (string) $result->getResponse()->getUri() . ' </info> all tests passed');
40
+        $this->output->writeln('   <info> '.(string) $result->getResponse()->getUri().' </info> all tests passed');
41 41
     }
42 42
 
43 43
     protected function renderSkipped(CheckResult $result)
44 44
     {
45
-        $this->output->writeln('   <comment> ' . (string) $result->getResponse()->getUri() . ' </comment>test skipped');
46
-        $this->output->writeln('    - ' . $result->getMessage() . ' [rule: ' . $result->getRuleName() . ']');
45
+        $this->output->writeln('   <comment> '.(string) $result->getResponse()->getUri().' </comment>test skipped');
46
+        $this->output->writeln('    - '.$result->getMessage().' [rule: '.$result->getRuleName().']');
47 47
     }
48 48
 }
Please login to merge, or discard this patch.
src/Extensions/SmokeReporter/Reporter/LeankoalaReporter.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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 {
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
                     $this->send(
220 220
                         $identifier,
221 221
                         $currentSystem,
222
-                        $result->getMessage() . ' (url: ' . (string)$result->getResponse()->getUri() . ')',
222
+                        $result->getMessage().' (url: '.(string) $result->getResponse()->getUri().')',
223 223
                         $result->getStatus(),
224 224
                         $result->getValue(),
225 225
                         $tool,
@@ -235,12 +235,12 @@  discard block
 block discarded – undo
235 235
     private function getIdentifier(CheckResult $result)
236 236
     {
237 237
         if ($this->useUrlAsIdentifier) {
238
-            $suffix = '_' . md5((string)$result->getResponse()->getUri());
238
+            $suffix = '_'.md5((string) $result->getResponse()->getUri());
239 239
         } else {
240 240
             $suffix = '';
241 241
         }
242 242
 
243
-        return $this->tool . '_' . $result->getRuleName() . $suffix;
243
+        return $this->tool.'_'.$result->getRuleName().$suffix;
244 244
     }
245 245
 
246 246
     private function getPrefix($string)
@@ -272,8 +272,8 @@  discard block
 block discarded – undo
272 272
                 $this->reporter->sendEvent($event);
273 273
             } catch (KoalamonException $e) {
274 274
                 $this->output->writeln("\n  <error> Error sending result to leankoala. </error>");
275
-                $this->output->writeln('   Url: ' . $e->getUrl());
276
-                $this->output->writeln('   Payload: ' . $e->getPayload());
275
+                $this->output->writeln('   Url: '.$e->getUrl());
276
+                $this->output->writeln('   Payload: '.$e->getPayload());
277 277
                 $this->output->writeln("");
278 278
             } catch (\Exception $e) {
279 279
                 $this->output->writeln($e->getMessage());
Please login to merge, or discard this patch.