Completed
Push — master ( b7508b...b025bf )
by Nils
03:16
created
src/Extensions/SmokeReporter/Reporter/CliReporter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,15 +30,15 @@
 block discarded – undo
30 30
 
31 31
     protected function renderFailure(Result $result)
32 32
     {
33
-        $this->output->writeln('   <error> ' . $result->getUrl() . ' </error> coming from ' . (string) $this->retriever->getComingFrom($result->getUrl()));
33
+        $this->output->writeln('   <error> '.$result->getUrl().' </error> coming from '.(string) $this->retriever->getComingFrom($result->getUrl()));
34 34
         foreach ($result->getMessages() as $ruleName => $message) {
35
-            $this->output->writeln('    - ' . $message . " [rule: $ruleName]");
35
+            $this->output->writeln('    - '.$message." [rule: $ruleName]");
36 36
         }
37 37
         $this->output->writeln('');
38 38
     }
39 39
 
40 40
     protected function renderSuccess(Result $result)
41 41
     {
42
-        $this->output->writeln('   <info> ' . $result->getUrl() . ' </info> all tests passed');
42
+        $this->output->writeln('   <info> '.$result->getUrl().' </info> all tests passed');
43 43
     }
44 44
 }
Please login to merge, or discard this patch.
src/Rules/Html/RegExExistsRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
     protected function doValidation(Response $response)
26 26
     {
27 27
         foreach ($this->regExs as $regEx) {
28
-            $this->assert(preg_match('^' . $regEx . '^', (string) $response->getBody()) > 0,
29
-                'The given regular expression (' . $regEx . ') was not found in this document.');
28
+            $this->assert(preg_match('^'.$regEx.'^', (string) $response->getBody()) > 0,
29
+                'The given regular expression ('.$regEx.') was not found in this document.');
30 30
         }
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
src/Rules/Html/XPathExistsRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,15 +31,15 @@
 block discarded – undo
31 31
 
32 32
             if ($xpath['relation'] = 'equals') {
33 33
                 $result = $count === $xpath['value'];
34
-                $message = 'The xpath "' . $xpath['pattern'] . '" was found ' . $count . ' times. Expected were exact ' . $xpath['value'] . ' occurencies.';
34
+                $message = 'The xpath "'.$xpath['pattern'].'" was found '.$count.' times. Expected were exact '.$xpath['value'].' occurencies.';
35 35
             } elseif ($xpath['relation'] === 'less than') {
36 36
                 $result = $count < $xpath['value'];
37
-                $message = 'The xpath "' . $xpath['pattern'] . '" was found ' . $count . ' times. Expected were less than ' . $xpath['value'] . '.';
37
+                $message = 'The xpath "'.$xpath['pattern'].'" was found '.$count.' times. Expected were less than '.$xpath['value'].'.';
38 38
             } elseif ($xpath['relation'] === 'greater than') {
39 39
                 $result = $count > $xpath['value'];
40
-                $message = 'The xpath "' . $xpath['pattern'] . '" was found ' . $count . ' times. Expected were more than ' . $xpath['value'] . '.';
40
+                $message = 'The xpath "'.$xpath['pattern'].'" was found '.$count.' times. Expected were more than '.$xpath['value'].'.';
41 41
             } else {
42
-                throw new \RuntimeException('Relation not defined. Given "' . $xpath['relation'] . '" expected [equals, greater than, less than]');
42
+                throw new \RuntimeException('Relation not defined. Given "'.$xpath['relation'].'" expected [equals, greater than, less than]');
43 43
             }
44 44
 
45 45
             $this->assert($result, $message);
Please login to merge, or discard this patch.
src/Rules/Http/HttpsCertificateExpireRule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@
 block discarded – undo
26 26
         $validTo = date('d.m.Y H:i:s', $certInfo['validTo_time_t']);
27 27
 
28 28
         if ($certInfo['validFrom_time_t'] > time() || $certInfo['validTo_time_t'] < time()) {
29
-            $errorMessage = 'Certificate is expired. [' . $validFrom . ' - ' . $validTo . ']';
29
+            $errorMessage = 'Certificate is expired. ['.$validFrom.' - '.$validTo.']';
30 30
             throw new ValidationFailedException($errorMessage);
31
-        } elseif ($certInfo['validTo_time_t'] < strtotime('+' . $this->expireWarningTime . 'days')) {
32
-            $errorMessage = 'Certificate warning, expires in less than ' . $this->expireWarningTime . ' days. Certificate expires at: ' . $validTo;
31
+        } elseif ($certInfo['validTo_time_t'] < strtotime('+'.$this->expireWarningTime.'days')) {
32
+            $errorMessage = 'Certificate warning, expires in less than '.$this->expireWarningTime.' days. Certificate expires at: '.$validTo;
33 33
             throw new ValidationFailedException($errorMessage);
34 34
         }
35 35
 
Please login to merge, or discard this patch.
src/Rules/Http/HttpsRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         $sslOptions = stream_context_create(array('ssl' => array('capture_peer_cert' => true)));
30 30
 
31 31
         $request = stream_socket_client(
32
-            'ssl://' . $host . ':443',
32
+            'ssl://'.$host.':443',
33 33
             $errno,
34 34
             $errstr,
35 35
             30,
Please login to merge, or discard this patch.
src/Rules/Http/HttpsCertificateAuthorityRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@
 block discarded – undo
23 23
     {
24 24
         if (array_key_exists('issuer', $certInfo) and array_key_exists('CN', $certInfo['issuer'])) {
25 25
             if ($certInfo['issuer']['CN'] != $this->authorityName) {
26
-                throw new ValidationFailedException('Expected authority was "' . $this->authorityName . '", "' . $certInfo['issuer']['CN'] . '" found.');
26
+                throw new ValidationFailedException('Expected authority was "'.$this->authorityName.'", "'.$certInfo['issuer']['CN'].'" found.');
27 27
             }
28 28
         } else {
29
-            throw new ValidationFailedException('Expected authority was "' . $this->authorityName . '". No authority found.');
29
+            throw new ValidationFailedException('Expected authority was "'.$this->authorityName.'". No authority found.');
30 30
         }
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
src/Rules/Html/RegExNotExistsRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
     protected function doValidation(Response $response)
26 26
     {
27 27
         foreach ($this->regExs as $regEx) {
28
-            $this->assert(preg_match('^' . $regEx . '^', (string) $response->getBody()) === 0,
29
-                'The given regular expression (' . $regEx . ') was found in this document.');
28
+            $this->assert(preg_match('^'.$regEx.'^', (string) $response->getBody()) === 0,
29
+                'The given regular expression ('.$regEx.') was found in this document.');
30 30
         }
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
src/Extensions/SmokeReporter/Reporter/KoalamonReporter.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
     public function finish()
94 94
     {
95
-        $this->output->writeln('Sending results to ' . $this->server . " ... \n");
95
+        $this->output->writeln('Sending results to '.$this->server." ... \n");
96 96
 
97 97
         if ($this->groupBy === 'prefix') {
98 98
             $this->sendGroupedByPrefix();
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 
124 124
         foreach ($this->getRuleKeys() as $rule) {
125 125
             foreach ($systems as $system) {
126
-                $identifier = $this->tool . '_' . $this->getPrefix($rule) . '_' . $system;
126
+                $identifier = $this->tool.'_'.$this->getPrefix($rule).'_'.$system;
127 127
                 $failureMessages[$identifier]['message'] = '';
128 128
                 $failureMessages[$identifier]['system'] = $system;
129 129
                 $failureMessages[$identifier]['tool'] = $this->getPrefix($rule);
@@ -140,22 +140,22 @@  discard block
 block discarded – undo
140 140
                         $system = $this->retriever->getSystem(($result->getUrl()));
141 141
                     }
142 142
 
143
-                    $identifer = $this->tool . '_' . $this->getPrefix($ruleLKey) . '_' . $system;
143
+                    $identifer = $this->tool.'_'.$this->getPrefix($ruleLKey).'_'.$system;
144 144
 
145 145
                     if ($failureMessages[$identifer]['message'] === '') {
146
-                        $failureMessages[$identifer]['message'] = 'The ' . $this->getPrefix($ruleLKey) . ' test for #system_name# failed.<ul>';
146
+                        $failureMessages[$identifer]['message'] = 'The '.$this->getPrefix($ruleLKey).' test for #system_name# failed.<ul>';
147 147
                     }
148 148
                     ++$counter[$identifer];
149
-                    $failureMessages[$identifer]['message'] .= '<li>' . $message . '<br>url: ' . $result->getUrl() . ', coming from: ' . $this->retriever->getComingFrom($result->getUrl()) . '</li>';
149
+                    $failureMessages[$identifer]['message'] .= '<li>'.$message.'<br>url: '.$result->getUrl().', coming from: '.$this->retriever->getComingFrom($result->getUrl()).'</li>';
150 150
                 }
151 151
             }
152 152
         }
153 153
 
154 154
         foreach ($failureMessages as $key => $failureMessage) {
155 155
             if ($failureMessage['message'] !== '') {
156
-                $this->send($this->identifier . '_' . $key, $failureMessage['system'], $failureMessage['message'] . '</ul>', self::STATUS_FAILURE, '', $counter[$key], $failureMessage['tool']);
156
+                $this->send($this->identifier.'_'.$key, $failureMessage['system'], $failureMessage['message'].'</ul>', self::STATUS_FAILURE, '', $counter[$key], $failureMessage['tool']);
157 157
             } else {
158
-                $this->send($this->identifier . '_' . $key, $failureMessage['system'], '', self::STATUS_SUCCESS, '', 0, $failureMessage['tool']);
158
+                $this->send($this->identifier.'_'.$key, $failureMessage['system'], '', self::STATUS_SUCCESS, '', 0, $failureMessage['tool']);
159 159
             }
160 160
         }
161 161
     }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
             $failedTests = array();
168 168
             if ($result->isFailure()) {
169 169
                 foreach ($result->getMessages() as $ruleLKey => $message) {
170
-                    $identifier = 'smoke_' . $ruleLKey . '_' . $result->getUrl();
170
+                    $identifier = 'smoke_'.$ruleLKey.'_'.$result->getUrl();
171 171
 
172 172
                     if ($this->system === '') {
173 173
                         $system = str_replace('http://', '', $result->getUrl());
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
             }
181 181
             foreach ($rules as $rule) {
182 182
                 if (!in_array($rule, $failedTests, true)) {
183
-                    $identifier = 'smoke_' . $rule . '_' . $result->getUrl();
183
+                    $identifier = 'smoke_'.$rule.'_'.$result->getUrl();
184 184
 
185 185
                     if ($this->systemUseRetriever) {
186 186
                         $system = $this->retriever->getSystem($result->getUrl());
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                     } else {
190 190
                         $system = $this->system;
191 191
                     }
192
-                    $this->send($identifier, $system, 'smoke_' . $rule . '_' . $result->getUrl(), self::STATUS_SUCCESS, (string) $result->getUrl());
192
+                    $this->send($identifier, $system, 'smoke_'.$rule.'_'.$result->getUrl(), self::STATUS_SUCCESS, (string) $result->getUrl());
193 193
                 }
194 194
             }
195 195
         }
@@ -213,16 +213,16 @@  discard block
 block discarded – undo
213 213
                         $system = $this->retriever->getSystem(new Uri($result->getUrl()));
214 214
                     }
215 215
                     if ($failureMessages[$ruleLKey] === '') {
216
-                        $failureMessages[$ruleLKey]['message'] = '    The smoke test for #system_name# failed (Rule: ' . $ruleLKey . ').<ul>';
216
+                        $failureMessages[$ruleLKey]['message'] = '    The smoke test for #system_name# failed (Rule: '.$ruleLKey.').<ul>';
217 217
                     }
218 218
                     ++$counter[$ruleLKey];
219 219
 
220 220
                     $comingFrom = '';
221 221
                     if ($this->retriever->getComingFrom($result->getUrl())) {
222
-                        $comingFrom = ', coming from: ' . $this->retriever->getComingFrom($result->getUrl());
222
+                        $comingFrom = ', coming from: '.$this->retriever->getComingFrom($result->getUrl());
223 223
                     }
224 224
 
225
-                    $failureMessages[$ruleLKey]['message'] .= '<li>' . $message . ' (url: ' . $result->getUrl() . $comingFrom . ')</li > ';
225
+                    $failureMessages[$ruleLKey]['message'] .= '<li>'.$message.' (url: '.$result->getUrl().$comingFrom.')</li > ';
226 226
                     $failureMessages[$ruleLKey]['system'] = $system;
227 227
                 }
228 228
             }
@@ -230,9 +230,9 @@  discard block
 block discarded – undo
230 230
 
231 231
         foreach ($failureMessages as $key => $failureMessage) {
232 232
             if ($failureMessage !== '') {
233
-                $this->send($this->identifier . '_' . $key, $this->system, $failureMessage['message'] . ' </ul > ', self::STATUS_FAILURE, '', $counter[$key]);
233
+                $this->send($this->identifier.'_'.$key, $this->system, $failureMessage['message'].' </ul > ', self::STATUS_FAILURE, '', $counter[$key]);
234 234
             } else {
235
-                $this->send($this->identifier . '_' . $key, $this->system, '', self::STATUS_SUCCESS, '', 0);
235
+                $this->send($this->identifier.'_'.$key, $this->system, '', self::STATUS_SUCCESS, '', 0);
236 236
             }
237 237
         }
238 238
     }
Please login to merge, or discard this patch.