Completed
Push — master ( 0a710f...23c5f7 )
by Nils
03:26
created
src/Cli/Command/SmokeCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
      */
46 46
     protected function writeSmokeCredentials($url = null)
47 47
     {
48
-        $this->output->writeln("\n Smoke " . SMOKE_VERSION . " by Nils Langner\n");
48
+        $this->output->writeln("\n Smoke ".SMOKE_VERSION." by Nils Langner\n");
49 49
 
50 50
         if ($url) {
51
-            $this->output->writeln(' <info>Scanning ' . $url . "</info>\n");
51
+            $this->output->writeln(' <info>Scanning '.$url."</info>\n");
52 52
         }
53 53
     }
54 54
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
                 if (file_exists($configFile)) {
108 108
                     $fileContent = file_get_contents($configFile);
109 109
                 } else {
110
-                    throw new \RuntimeException("Config file was not found ('" . $configFile . "').");
110
+                    throw new \RuntimeException("Config file was not found ('".$configFile."').");
111 111
                 }
112 112
             }
113 113
             $configArray = EnvAwareYaml::parse($fileContent);
Please login to merge, or discard this patch.
src/Cli/Command/ScanCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
      */
54 54
     private function initConfiguration($num_urls, $run_level, Uri $uri, Dispatcher $dispatcher)
55 55
     {
56
-        $configArray = $this->getConfigArray(__DIR__ . '/../../settings/' . self::CONFIG_FILE);
56
+        $configArray = $this->getConfigArray(__DIR__.'/../../settings/'.self::CONFIG_FILE);
57 57
 
58 58
         $config = new Configuration($uri, $dispatcher, $configArray);
59 59
 
Please login to merge, or discard this patch.
src/Cli/Command/WarmUpCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      */
57 57
     private function initConfiguration(Uri $uri, Dispatcher $dispatcher)
58 58
     {
59
-        $configArray = $this->getConfigArray(__DIR__ . '/../../settings/warmup.yml');
59
+        $configArray = $this->getConfigArray(__DIR__.'/../../settings/warmup.yml');
60 60
 
61 61
         $config = new Configuration($uri, $dispatcher, $configArray);
62 62
 
Please login to merge, or discard this patch.
src/Config/Configuration.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     private function initConfigArray(array $configArray, array $defaultSettings = null)
47 47
     {
48 48
         if ($defaultSettings === null) {
49
-            $defaultSettings = Yaml::parse(file_get_contents(__DIR__ . '/../settings/' . self::DEFAULT_SETTINGS));
49
+            $defaultSettings = Yaml::parse(file_get_contents(__DIR__.'/../settings/'.self::DEFAULT_SETTINGS));
50 50
         }
51 51
 
52 52
         if (count($configArray) === 0) {
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         if ($this->hasSection($section)) {
127 127
             return $this->configArray[$section];
128 128
         } else {
129
-            throw new \RuntimeException('The section (' . $section . ') you are trying to access does not exist.');
129
+            throw new \RuntimeException('The section ('.$section.') you are trying to access does not exist.');
130 130
         }
131 131
     }
132 132
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         if (array_key_exists($name, $this->extensions)) {
136 136
             return $this->extensions[$name];
137 137
         } else {
138
-            throw new \RuntimeException('The extension ("' . $name . '") you are trying to access does not exist. Registered extensions are: ' . implode(' ,', array_keys($this->extensions)) . '.');
138
+            throw new \RuntimeException('The extension ("'.$name.'") you are trying to access does not exist. Registered extensions are: '.implode(' ,', array_keys($this->extensions)).'.');
139 139
         }
140 140
     }
141 141
 
Please login to merge, or discard this patch.
src/Extensions/SmokeResponseRetriever/Retriever/ListRetriever/Retriever.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -53,20 +53,20 @@
 block discarded – undo
53 53
                         /* @var \Ivory\HttpAdapter\HttpAdapterException $exception */
54 54
 
55 55
                         $mainUri = $request->getUri();
56
-                        $this->redirects[(string) $mainUri->getScheme() . '://' . $mainUri->getHost() . $corruptUrl] = (string) $mainUri;
56
+                        $this->redirects[(string) $mainUri->getScheme().'://'.$mainUri->getHost().$corruptUrl] = (string) $mainUri;
57 57
 
58
-                        $this->urls[] = ['url' => $mainUri->getScheme() . '://' . $mainUri->getHost() . $corruptUrl, 'system' => $url['system']];
59
-                        $this->urlStack[] = ['url' => $mainUri->getScheme() . '://' . $mainUri->getHost() . $corruptUrl, 'system' => $url['system']];
58
+                        $this->urls[] = ['url' => $mainUri->getScheme().'://'.$mainUri->getHost().$corruptUrl, 'system' => $url['system']];
59
+                        $this->urlStack[] = ['url' => $mainUri->getScheme().'://'.$mainUri->getHost().$corruptUrl, 'system' => $url['system']];
60 60
 
61 61
                         return $this->next();
62 62
                     }
63 63
 
64 64
                     // the error handling should be done withing the calling class
65
-                    echo "\n   " . $exception->getMessage() . "\n";
65
+                    echo "\n   ".$exception->getMessage()."\n";
66 66
 
67 67
                     return $this->next();
68 68
                 } else {
69
-                    $errorMessages .= $exception->getMessage() . "\n";
69
+                    $errorMessages .= $exception->getMessage()."\n";
70 70
                 }
71 71
             }
72 72
             if ($errorMessages !== '') {
Please login to merge, or discard this patch.
src/Extensions/SmokeStop/StopExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         if (array_key_exists($name, $this->stopStrategies)) {
45 45
             return $this->stopStrategies[$name];
46 46
         } else {
47
-            throw new \RuntimeException("Strategy ('" . $name . "') not found. Available strategies are " . implode(', ', array_keys($this->stopStrategies)));
47
+            throw new \RuntimeException("Strategy ('".$name."') not found. Available strategies are ".implode(', ', array_keys($this->stopStrategies)));
48 48
         }
49 49
     }
50 50
 }
Please login to merge, or discard this patch.
src/Extensions/SmokeFilter/FilterExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
     public function init($filters = array(), $filterFile = '', $exclusive = array())
42 42
     {
43 43
         if (count($exclusive) > 0 && (count($filters) > 0 || $filterFile !== '')) {
44
-            throw new \RuntimeException("It's not possible to define filter lists and an exclusive list at the same time [Extension: " . get_class($this) . '].');
44
+            throw new \RuntimeException("It's not possible to define filter lists and an exclusive list at the same time [Extension: ".get_class($this).'].');
45 45
         }
46 46
 
47 47
         if ($filterFile !== '') {
48 48
             if (!file_exists($filterFile)) {
49
-                throw new \RuntimeException('Filter file not found: ' . $filterFile);
49
+                throw new \RuntimeException('Filter file not found: '.$filterFile);
50 50
             }
51 51
 
52 52
             $filterElements = EnvAwareYaml::parse(file_get_contents($filterFile));
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     private function isFilteredByFilter($ruleName, $uri)
106 106
     {
107 107
         foreach ($this->filters as $filter) {
108
-            if ($ruleName === $filter['rule'] && 0 < preg_match('$' . $filter['uri'] . '$', $uri)) {
108
+            if ($ruleName === $filter['rule'] && 0 < preg_match('$'.$filter['uri'].'$', $uri)) {
109 109
                 return true;
110 110
             }
111 111
         }
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 . ' failed.<ul>';
146
+                        $failureMessages[$identifer]['message'] = 'The '.$this->getPrefix($ruleLKey).' test for '.$system.' 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 . ' failed (Rule: ' . $ruleLKey . ').<ul>';
216
+                        $failureMessages[$ruleLKey]['message'] = '    The smoke test for '.$system.' 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.
src/Extensions/SmokeReporter/Reporter/StandardCliReporter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -55,11 +55,11 @@  discard block
 block discarded – undo
55 55
             if ($result->isFailure()) {
56 56
                 if (array_key_exists($ruleKey, $result->getMessages())) {
57 57
                     $messages = $result->getMessages();
58
-                    $failedUrls[] = (string) $result->getUrl() . ' - ' . $messages[$ruleKey];
58
+                    $failedUrls[] = (string) $result->getUrl().' - '.$messages[$ruleKey];
59 59
                     ++$count;
60 60
                 }
61 61
                 if ($count > $this->maxResults) {
62
-                    $failedUrls[] = '... only the first ' . $this->maxResults . ' elements are shown.';
62
+                    $failedUrls[] = '... only the first '.$this->maxResults.' elements are shown.';
63 63
                     break;
64 64
                 }
65 65
             }
@@ -77,15 +77,15 @@  discard block
 block discarded – undo
77 77
             $failedUrls = $this->getFailedUrls($ruleKey);
78 78
 
79 79
             if (count($failedUrls) > 0) {
80
-                $this->output->writeln('  <error> ' . get_class($rule) . ' </error>');
80
+                $this->output->writeln('  <error> '.get_class($rule).' </error>');
81 81
             } else {
82
-                $this->output->writeln('  <info> ' . get_class($rule) . ' </info>');
82
+                $this->output->writeln('  <info> '.get_class($rule).' </info>');
83 83
             }
84 84
 
85
-            $this->output->writeln('   ' . str_replace("\n", "\n   ", $info['documentation']) . "\n");
85
+            $this->output->writeln('   '.str_replace("\n", "\n   ", $info['documentation'])."\n");
86 86
 
87 87
             foreach ($failedUrls as $failedUrl) {
88
-                $this->output->writeln('   - ' . $failedUrl);
88
+                $this->output->writeln('   - '.$failedUrl);
89 89
             }
90 90
 
91 91
             $this->output->writeln('');
Please login to merge, or discard this patch.