Completed
Push — master ( 570770...a6b359 )
by Nils
02:33
created
src/Rules/Json/JsonPathExistsRule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,17 +65,17 @@
 block discarded – undo
65 65
 
66 66
             if ($jsonValue === FALSE || (is_array($jsonValue) && empty($jsonValue))) {
67 67
                 $error = true;
68
-                $noCorrectJsonPaths[] = $path['pattern'] . ' (JSON Path not found)';
68
+                $noCorrectJsonPaths[] = $path['pattern'].' (JSON Path not found)';
69 69
             }
70 70
             if ($this->checkRelation($path['relation'], $path['value'], $count) === false) {
71 71
                 $error = true;
72
-                $noCorrectJsonPaths[] = $path['pattern'] . ' (number of JSONPaths is not correct corresponding to the given relation/value)';
72
+                $noCorrectJsonPaths[] = $path['pattern'].' (number of JSONPaths is not correct corresponding to the given relation/value)';
73 73
             }
74 74
         }
75 75
 
76 76
         if ($error === true) {
77 77
             $allNoCorrectJsonPaths = implode('", "', $noCorrectJsonPaths);
78
-            throw new ValidationFailedException('Disonances with JSON Paths "' . $allNoCorrectJsonPaths . '!');
78
+            throw new ValidationFailedException('Disonances with JSON Paths "'.$allNoCorrectJsonPaths.'!');
79 79
         }
80 80
     }
81 81
 }
Please login to merge, or discard this patch.
src/Extensions/SmokeReporter/Reporter/KoalamonReporter.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
     public function finish()
97 97
     {
98
-        $this->output->writeln('Sending results to ' . $this->server . " ... \n");
98
+        $this->output->writeln('Sending results to '.$this->server." ... \n");
99 99
 
100 100
         if ($this->groupBy === 'prefix') {
101 101
             $this->sendGroupedByPrefix();
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
         foreach ($this->getRuleKeys() as $rule) {
128 128
             foreach ($systems as $system) {
129
-                $identifier = $this->tool . '_' . $this->getPrefix($rule) . '_' . $system;
129
+                $identifier = $this->tool.'_'.$this->getPrefix($rule).'_'.$system;
130 130
                 $failureMessages[$identifier]['message'] = '';
131 131
                 $failureMessages[$identifier]['system'] = $system;
132 132
                 $failureMessages[$identifier]['tool'] = $this->getPrefix($rule);
@@ -143,15 +143,15 @@  discard block
 block discarded – undo
143 143
                         $system = $this->retriever->getSystem(($result->getUrl()));
144 144
                     }
145 145
 
146
-                    $identifer = $this->tool . '_' . $this->getPrefix($ruleLKey) . '_' . $system;
146
+                    $identifer = $this->tool.'_'.$this->getPrefix($ruleLKey).'_'.$system;
147 147
 
148 148
                     if ($failureMessages[$identifer]['message'] === '') {
149
-                        $failureMessages[$identifer]['message'] = 'The ' . $this->getPrefix($ruleLKey) . ' test for #system_name# failed.<ul>';
149
+                        $failureMessages[$identifer]['message'] = 'The '.$this->getPrefix($ruleLKey).' test for #system_name# failed.<ul>';
150 150
                     }
151 151
                     ++$counter[$identifer];
152
-                    $message = '<li>' . $message . '<br>url: ' . $result->getUrl();
152
+                    $message = '<li>'.$message.'<br>url: '.$result->getUrl();
153 153
                     if ($this->addComingFrom) {
154
-                        $message .= ', coming from: ' . $this->retriever->getComingFrom($result->getUrl());
154
+                        $message .= ', coming from: '.$this->retriever->getComingFrom($result->getUrl());
155 155
                     }
156 156
                     $message .= '</li>';
157 157
                     $failureMessages[$identifer]['message'] .= $message;
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
 
162 162
         foreach ($failureMessages as $key => $failureMessage) {
163 163
             if ($failureMessage['message'] !== '') {
164
-                $this->send($this->identifier . '_' . $key, $failureMessage['system'], $failureMessage['message'] . '</ul>', self::STATUS_FAILURE, '', $counter[$key], $failureMessage['tool']);
164
+                $this->send($this->identifier.'_'.$key, $failureMessage['system'], $failureMessage['message'].'</ul>', self::STATUS_FAILURE, '', $counter[$key], $failureMessage['tool']);
165 165
             } else {
166
-                $this->send($this->identifier . '_' . $key, $failureMessage['system'], '', self::STATUS_SUCCESS, '', 0, $failureMessage['tool']);
166
+                $this->send($this->identifier.'_'.$key, $failureMessage['system'], '', self::STATUS_SUCCESS, '', 0, $failureMessage['tool']);
167 167
             }
168 168
         }
169 169
     }
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
             $failedTests = array();
176 176
             if ($result->isFailure()) {
177 177
                 foreach ($result->getMessages() as $ruleLKey => $message) {
178
-                    $identifier = 'smoke_' . $ruleLKey . '_' . $result->getUrl();
178
+                    $identifier = 'smoke_'.$ruleLKey.'_'.$result->getUrl();
179 179
 
180 180
                     if ($this->system === '') {
181 181
                         $system = str_replace('http://', '', $result->getUrl());
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
             }
189 189
             foreach ($rules as $rule) {
190 190
                 if (!in_array($rule, $failedTests, true)) {
191
-                    $identifier = 'smoke_' . $rule . '_' . $result->getUrl();
191
+                    $identifier = 'smoke_'.$rule.'_'.$result->getUrl();
192 192
 
193 193
                     if ($this->systemUseRetriever) {
194 194
                         $system = $this->retriever->getSystem($result->getUrl());
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
                     } else {
198 198
                         $system = $this->system;
199 199
                     }
200
-                    $this->send($identifier, $system, 'smoke_' . $rule . '_' . $result->getUrl(), self::STATUS_SUCCESS, (string) $result->getUrl());
200
+                    $this->send($identifier, $system, 'smoke_'.$rule.'_'.$result->getUrl(), self::STATUS_SUCCESS, (string) $result->getUrl());
201 201
                 }
202 202
             }
203 203
         }
@@ -221,17 +221,17 @@  discard block
 block discarded – undo
221 221
                         $system = $this->retriever->getSystem(new Uri($result->getUrl()));
222 222
                     }
223 223
                     if ($failureMessages[$ruleLKey] === '') {
224
-                        $failureMessages[$ruleLKey]['message'] = '    The smoke test for #system_name# failed (Rule: ' . $ruleLKey . ').<ul>';
224
+                        $failureMessages[$ruleLKey]['message'] = '    The smoke test for #system_name# failed (Rule: '.$ruleLKey.').<ul>';
225 225
                     }
226 226
                     ++$counter[$ruleLKey];
227 227
 
228 228
                     $comingFrom = '';
229 229
 
230 230
                     if ($this->addComingFrom && $this->retriever->getComingFrom($result->getUrl())) {
231
-                        $comingFrom = ', coming from: ' . $this->retriever->getComingFrom($result->getUrl());
231
+                        $comingFrom = ', coming from: '.$this->retriever->getComingFrom($result->getUrl());
232 232
                     }
233 233
 
234
-                    $failureMessages[$ruleLKey]['message'] .= '<li>' . $message . ' (url: ' . $result->getUrl() . $comingFrom . ')</li > ';
234
+                    $failureMessages[$ruleLKey]['message'] .= '<li>'.$message.' (url: '.$result->getUrl().$comingFrom.')</li > ';
235 235
                     $failureMessages[$ruleLKey]['system'] = $system;
236 236
                 }
237 237
             }
@@ -239,9 +239,9 @@  discard block
 block discarded – undo
239 239
 
240 240
         foreach ($failureMessages as $key => $failureMessage) {
241 241
             if ($failureMessage !== '') {
242
-                $this->send($this->identifier . '_' . $key, $this->system, $failureMessage['message'] . ' </ul > ', self::STATUS_FAILURE, '', $counter[$key]);
242
+                $this->send($this->identifier.'_'.$key, $this->system, $failureMessage['message'].' </ul > ', self::STATUS_FAILURE, '', $counter[$key]);
243 243
             } else {
244
-                $this->send($this->identifier . '_' . $key, $this->system, '', self::STATUS_SUCCESS, '', 0);
244
+                $this->send($this->identifier.'_'.$key, $this->system, '', self::STATUS_SUCCESS, '', 0);
245 245
             }
246 246
         }
247 247
     }
Please login to merge, or discard this patch.
src/Rules/Xml/XmlValidXsdRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,12 +39,12 @@
 block discarded – undo
39 39
                 $error = true;
40 40
                 $lastError = libxml_get_last_error();
41 41
 
42
-                $messageParts[] = $xsdFile['xsdfilename'] . ' - ' . $xsdFile['xsdfileurl'] . '(last error: ' . str_replace("\n", '', $lastError->message) . ').';
42
+                $messageParts[] = $xsdFile['xsdfilename'].' - '.$xsdFile['xsdfileurl'].'(last error: '.str_replace("\n", '', $lastError->message).').';
43 43
             }
44 44
         }
45 45
 
46 46
         if ($error === true) {
47
-            $message = 'XML file (' . $filename . ')  does not validate against the following XSD files: ' . implode(', ', $messageParts);
47
+            $message = 'XML file ('.$filename.')  does not validate against the following XSD files: '.implode(', ', $messageParts);
48 48
             throw new ValidationFailedException($message);
49 49
         }
50 50
     }
Please login to merge, or discard this patch.
src/Rules/Json/JsonSchema/JsonSchemaRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $data = json_decode($response->getBody());
38 38
         if ($data === null) {
39
-            throw new ValidationFailedException("The given JSON data can not be validated (last error: '" . $this->json_errors[json_last_error()] . "').");
39
+            throw new ValidationFailedException("The given JSON data can not be validated (last error: '".$this->json_errors[json_last_error()]."').");
40 40
         } else {
41 41
             $error = false;
42 42
             $messageParts = array();
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
                     $error = true;
54 54
                     $errorMessage = '';
55 55
                     foreach ($validator->getErrors() as $error) {
56
-                        $errorMessage = $errorMessage . sprintf("[%s] %s\n", $error['property'], $error['message']);
56
+                        $errorMessage = $errorMessage.sprintf("[%s] %s\n", $error['property'], $error['message']);
57 57
                     }
58
-                    $messageParts[] = $jsonSchemaFile['jsonschemafilename'] . ' - ' . $jsonSchemaFile['jsonschemafileurl'] . '(last error: ' . $errorMessage . ').';
58
+                    $messageParts[] = $jsonSchemaFile['jsonschemafilename'].' - '.$jsonSchemaFile['jsonschemafileurl'].'(last error: '.$errorMessage.').';
59 59
                 }
60 60
             }
61 61
 
62 62
             if ($error === true) {
63
-                $message = 'JSON file (' . (string) $response->getUri() . ')  does not validate against the following JSON Schema files: ' . implode(', ', $messageParts);
63
+                $message = 'JSON file ('.(string) $response->getUri().')  does not validate against the following JSON Schema files: '.implode(', ', $messageParts);
64 64
                 throw new ValidationFailedException($message);
65 65
             }
66 66
         }
Please login to merge, or discard this patch.
src/Rules/Html/RegExExistsRule.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,12 +29,12 @@  discard block
 block discarded – undo
29 29
 
30 30
         foreach ($this->regExs as $regEx) {
31 31
             if ($regEx['isRegEx']) {
32
-                if (preg_match('^' . $regEx['pattern'] . '^', (string) $response->getBody()) === 0) {
33
-                    $errors[] = 'Regular expression: ' . $regEx['pattern'];
32
+                if (preg_match('^'.$regEx['pattern'].'^', (string) $response->getBody()) === 0) {
33
+                    $errors[] = 'Regular expression: '.$regEx['pattern'];
34 34
                 }
35 35
             } else {
36
-                if (preg_match('^' . preg_quote($regEx['pattern']) . '^', (string) $response->getBody()) === 0) {
37
-                    $errors[] = 'Text: ' . $regEx['pattern'];
36
+                if (preg_match('^'.preg_quote($regEx['pattern']).'^', (string) $response->getBody()) === 0) {
37
+                    $errors[] = 'Text: '.$regEx['pattern'];
38 38
                 }
39 39
             }
40 40
         }
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             $errorString = 'The following text elements where not found: <ul>';
44 44
 
45 45
             foreach ($errors as $error) {
46
-                $errorString .= '<li>' . $error . '</li>';
46
+                $errorString .= '<li>'.$error.'</li>';
47 47
             }
48 48
 
49 49
             $errorString .= '</ul>';
Please login to merge, or discard this patch.