Completed
Push — master ( b211f5...44c82e )
by Nils
02:04
created
src/Extensions/SmokeReporter/Reporter/WarmUpLiveReporter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,14 +22,14 @@
 block discarded – undo
22 22
         if (count($results) > 0) {
23 23
             ++$this->urlCount;
24 24
             $firstResult = array_pop($results);
25
-            $this->output->writeln('   ' . (string) $firstResult->getResponse()->getUri());
25
+            $this->output->writeln('   '.(string) $firstResult->getResponse()->getUri());
26 26
             $this->output->writeln('');
27 27
         }
28 28
     }
29 29
 
30 30
     public function finish()
31 31
     {
32
-        $this->output->writeln('   <comment>Warm up finished. ' . $this->urlCount . ' urls visited.</comment>');
32
+        $this->output->writeln('   <comment>Warm up finished. '.$this->urlCount.' urls visited.</comment>');
33 33
         $this->output->writeln('');
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
src/Scanner/Scanner.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
             } catch (ValidationFailedException $e) {
97 97
                 $result = new CheckResult(CheckResult::STATUS_FAILURE, $e->getMessage());
98 98
             } catch (\Exception $e) {
99
-                $result = new CheckResult(CheckResult::STATUS_FAILURE, 'An error occured: ' . $e->getMessage());
99
+                $result = new CheckResult(CheckResult::STATUS_FAILURE, 'An error occured: '.$e->getMessage());
100 100
             }
101 101
 
102 102
             $result->setResponse($response);
Please login to merge, or discard this patch.
src/Rules/Http/Header/ExistsRule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@
 block discarded – undo
24 24
 
25 25
         foreach ($this->checkedHeaders as $headerConfig) {
26 26
             if (!$response->hasHeader($headerConfig['key'])) {
27
-                throw new ValidationFailedException('Header not found (' . $headerConfig['key'] . ')');
27
+                throw new ValidationFailedException('Header not found ('.$headerConfig['key'].')');
28 28
             }
29 29
 
30 30
             $currentValue = $response->getHeader($headerConfig['key'])[0];
31 31
 
32
-            if (!preg_match('%' . $headerConfig['value'] . '%', $currentValue, $matches)) {
33
-                throw new ValidationFailedException('Header "' . $headerConfig['key'] . '" does not match "' . $headerConfig['value'] . '". Current value is "' . $currentValue . '"');
32
+            if (!preg_match('%'.$headerConfig['value'].'%', $currentValue, $matches)) {
33
+                throw new ValidationFailedException('Header "'.$headerConfig['key'].'" does not match "'.$headerConfig['value'].'". Current value is "'.$currentValue.'"');
34 34
             }
35 35
         }
36 36
     }
Please login to merge, or discard this patch.
src/Extensions/SmokeReporter/Reporter/XUnitReporter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $failures = 0;
60 60
 
61 61
         if ($this->retriever instanceof CrawlingRetriever) {
62
-            $startPage = (string)$this->retriever->getStartPage();
62
+            $startPage = (string) $this->retriever->getStartPage();
63 63
         } else {
64 64
             $startPage = '';
65 65
         }
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
                     $testCase->addFailure(new Failure($ruleName, $message));
81 81
 
82 82
                     if ($this->retriever instanceof CrawlingRetriever) {
83
-                        $stackTrace = $result->getUrl() . ' coming from ' . (string)$this->retriever->getComingFrom($result->getUrl()) . PHP_EOL;
84
-                        $stackTrace .= '    - ' . $message . " [rule: $ruleName]";
83
+                        $stackTrace = $result->getUrl().' coming from '.(string) $this->retriever->getComingFrom($result->getUrl()).PHP_EOL;
84
+                        $stackTrace .= '    - '.$message." [rule: $ruleName]";
85 85
                         $testCase->setSystemOut($stackTrace);
86 86
                     }
87 87
                 }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
         file_put_contents($this->filename, $xUnitReport->toXml());
94 94
 
95
-        $this->output->writeln('    <info>Writing XUnit Output to file:</info> ' . $this->filename);
95
+        $this->output->writeln('    <info>Writing XUnit Output to file:</info> '.$this->filename);
96 96
     }
97 97
 
98 98
     public function processResults($results)
Please login to merge, or discard this patch.
src/Rules/Http/Header/GZipRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         if ($response instanceof ContentTypeAwareResponse) {
25 25
             if (strpos($response->getContentType(), 'image') === false
26 26
                 && strpos($response->getContentType(), 'pdf') === false
27
-                && strlen((string)$response->getBody()) >= $this->minFileSize
27
+                && strlen((string) $response->getBody()) >= $this->minFileSize
28 28
             ) {
29 29
                 if (!$response->hasHeader('Content-Encoding') || $response->getHeader('Content-Encoding')[0] !== 'gzip') {
30 30
                     throw new ValidationFailedException('gzip compression not active');
Please login to merge, or discard this patch.
src/Rules/Http/Header/SuccessStatusRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     public function validate(ResponseInterface $response)
23 23
     {
24 24
         if ($response->getStatusCode() > $this->maxStatusCode) {
25
-            throw new ValidationFailedException('Status code ' . $response->getStatusCode() . ' found.');
25
+            throw new ValidationFailedException('Status code '.$response->getStatusCode().' found.');
26 26
         }
27 27
     }
28 28
 }
Please login to merge, or discard this patch.
src/Rules/Http/Header/HttpStatusRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     public function validate(ResponseInterface $response)
27 27
     {
28 28
         if ($response->getStatusCode() !== $this->expectedStatus) {
29
-            throw new ValidationFailedException('Status code ' . $response->getStatusCode() . ' found, ' . $this->expectedStatus . ' expected.');
29
+            throw new ValidationFailedException('Status code '.$response->getStatusCode().' found, '.$this->expectedStatus.' expected.');
30 30
         }
31 31
     }
32 32
 }
Please login to merge, or discard this patch.
src/Rules/Http/DurationRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,14 +29,14 @@
 block discarded – undo
29 29
             if ($response->getDuration() > $this->maxDuration) {
30 30
                 return new CheckResult(
31 31
                     CheckResult::STATUS_FAILURE,
32
-                    'The http request took ' . (int)$response->getDuration() . ' milliseconds (limit was ' . $this->maxDuration . 'ms).',
33
-                    (int)$response->getDuration());
32
+                    'The http request took '.(int) $response->getDuration().' milliseconds (limit was '.$this->maxDuration.'ms).',
33
+                    (int) $response->getDuration());
34 34
             }
35 35
 
36 36
             return new CheckResult(
37 37
                 CheckResult::STATUS_SUCCESS,
38
-                'The http request took ' . (int)$response->getDuration() . ' milliseconds.',
39
-                (int)$response->getDuration());
38
+                'The http request took '.(int) $response->getDuration().' milliseconds.',
39
+                (int) $response->getDuration());
40 40
         }
41 41
     }
42 42
 }
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(ResponseInterface $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.