Completed
Push — master ( 6da510...33a55e )
by Nils
05:34
created
src/Extensions/SmokeReporter/Reporter/CliReporter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@
 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
 }
Please login to merge, or discard this patch.
src/Rules/Json/JsonPathExistsRule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,17 +73,17 @@
 block discarded – undo
73 73
 
74 74
             if ($jsonValue === false || (is_array($jsonValue) && empty($jsonValue))) {
75 75
                 $error = true;
76
-                $noCorrectJsonPaths[] = $path['pattern'] . ' (JSON Path not found)';
76
+                $noCorrectJsonPaths[] = $path['pattern'].' (JSON Path not found)';
77 77
             }
78 78
             if ($this->checkRelation($path['relation'], $path['value'], $count) === false) {
79 79
                 $error = true;
80
-                $noCorrectJsonPaths[] = $path['pattern'] . ' (number of JSONPaths is not correct corresponding to the given relation/value)';
80
+                $noCorrectJsonPaths[] = $path['pattern'].' (number of JSONPaths is not correct corresponding to the given relation/value)';
81 81
             }
82 82
         }
83 83
 
84 84
         if ($error === true) {
85 85
             $allNoCorrectJsonPaths = implode('", "', $noCorrectJsonPaths);
86
-            throw new ValidationFailedException('Disonances with JSON Paths "' . $allNoCorrectJsonPaths . '!');
86
+            throw new ValidationFailedException('Disonances with JSON Paths "'.$allNoCorrectJsonPaths.'!');
87 87
         }
88 88
     }
89 89
 }
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 were 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.
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 === (int) $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 < (int) $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 > (int) $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/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/Yaml/EnvAwareYaml.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@
 block discarded – undo
12 12
 
13 13
         foreach ($matches[1] as $varName) {
14 14
             if (!getenv($varName)) {
15
-                throw new \RuntimeException('The mandatory env variable (' . $varName . ') from the config file was not set.');
15
+                throw new \RuntimeException('The mandatory env variable ('.$varName.') from the config file was not set.');
16 16
             }
17 17
 
18
-            $fileContent = str_replace('${' . $varName . '}', getenv($varName), $fileContent);
18
+            $fileContent = str_replace('${'.$varName.'}', getenv($varName), $fileContent);
19 19
         }
20 20
 
21 21
         return Yaml::parse($fileContent);
Please login to merge, or discard this patch.
src/Rules/Http/DurationRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@
 block discarded – undo
27 27
         if ($response->getDuration() > $this->maxDuration) {
28 28
             return new CheckResult(
29 29
                 CheckResult::STATUS_FAILURE,
30
-                'The http request took ' . (int) $response->getDuration() . ' milliseconds (limit was ' . $this->maxDuration . 'ms).',
30
+                'The http request took '.(int) $response->getDuration().' milliseconds (limit was '.$this->maxDuration.'ms).',
31 31
                 (int) $response->getDuration());
32 32
         }
33 33
 
34 34
         return new CheckResult(
35 35
             CheckResult::STATUS_SUCCESS,
36
-            'The http request took ' . (int) $response->getDuration() . ' milliseconds.',
36
+            'The http request took '.(int) $response->getDuration().' milliseconds.',
37 37
             (int) $response->getDuration());
38 38
     }
39 39
 }
Please login to merge, or discard this patch.
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/Rules/Json/JsonSchema/JsonSchemaRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     {
35 35
         $data = json_decode($response->getBody());
36 36
         if ($data === null) {
37
-            throw new ValidationFailedException("The given JSON data can not be validated (last error: '" . $this->json_errors[json_last_error()] . "').");
37
+            throw new ValidationFailedException("The given JSON data can not be validated (last error: '".$this->json_errors[json_last_error()]."').");
38 38
         } else {
39 39
             $errorStatus = false;
40 40
             $messageParts = array();
@@ -50,14 +50,14 @@  discard block
 block discarded – undo
50 50
                     $errorStatus = true;
51 51
                     $errorMessage = '';
52 52
                     foreach ($validator->getErrors() as $error) {
53
-                        $errorMessage = $errorMessage . sprintf("[%s] %s\n", $error['property'], $error['message']);
53
+                        $errorMessage = $errorMessage.sprintf("[%s] %s\n", $error['property'], $error['message']);
54 54
                     }
55
-                    $messageParts[] = $jsonSchemaFile['jsonfilename'] . ' - ' . $jsonSchemaFile['jsonfileurl'] . '(last error: ' . $errorMessage . ').';
55
+                    $messageParts[] = $jsonSchemaFile['jsonfilename'].' - '.$jsonSchemaFile['jsonfileurl'].'(last error: '.$errorMessage.').';
56 56
                 }
57 57
             }
58 58
 
59 59
             if ($errorStatus === true) {
60
-                $message = 'JSON file (' . (string) $response->getUri() . ')  does not validate against the following JSON Schema files: ' . implode(', ', $messageParts);
60
+                $message = 'JSON file ('.(string) $response->getUri().')  does not validate against the following JSON Schema files: '.implode(', ', $messageParts);
61 61
                 throw new ValidationFailedException($message);
62 62
             }
63 63
         }
Please login to merge, or discard this patch.