Completed
Push — master ( dbc2b7...0d33bf )
by Nils
04:40
created
src/Scanner/Scanner.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 
64 64
             $results = $this->checkResponse($response);
65 65
 
66
-            if(count($results) == 0) {
66
+            if (count($results) == 0) {
67 67
                 $checkResult = new CheckResult(CheckResult::STATUS_NONE, '');
68 68
                 $checkResult->setResponse($response);
69 69
                 $results = [$checkResult];
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/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/Seo/GoogleMobileFriendlyRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     private function getEndpoint(Uri $uri)
16 16
     {
17 17
         // return str_replace('#url#', urlencode('https://webhook.koalamon.com'), self::ENDPOINT);
18
-        return str_replace('#url#', urlencode((string)$uri), self::ENDPOINT);
18
+        return str_replace('#url#', urlencode((string) $uri), self::ENDPOINT);
19 19
     }
20 20
 
21 21
     public function validate(Response $response)
@@ -34,15 +34,15 @@  discard block
 block discarded – undo
34 34
             )));
35 35
 
36 36
         if (property_exists($result, 'error')) {
37
-            throw new ValidationFailedException('Google mobile friendly test was not passed. Error "' . $result->error->message . '"');
37
+            throw new ValidationFailedException('Google mobile friendly test was not passed. Error "'.$result->error->message.'"');
38 38
         }
39 39
 
40 40
         $passResult = $result->ruleGroups->USABILITY;
41 41
 
42 42
         if (!$passResult->pass) {
43
-            return new CheckResult(CheckResult::STATUS_FAILURE, 'Google mobile friendly test was not passed. Score ' . $passResult->score . '/100.', (int)$passResult->score);
43
+            return new CheckResult(CheckResult::STATUS_FAILURE, 'Google mobile friendly test was not passed. Score '.$passResult->score.'/100.', (int) $passResult->score);
44 44
         }
45 45
 
46
-        return new CheckResult(CheckResult::STATUS_SUCCESS, 'Google mobile friendly test passed. Score ' . $passResult->score . '/100.', (int)$passResult->score);
46
+        return new CheckResult(CheckResult::STATUS_SUCCESS, 'Google mobile friendly test passed. Score '.$passResult->score.'/100.', (int) $passResult->score);
47 47
     }
48 48
 }
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/Http/HttpsCertificateExpireRule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@
 block discarded – undo
25 25
         $validTo = date('d.m.Y H:i:s', $certInfo['validTo_time_t']);
26 26
 
27 27
         if ($certInfo['validFrom_time_t'] > time() || $certInfo['validTo_time_t'] < time()) {
28
-            $errorMessage = 'Certificate is expired. [' . $validFrom . ' - ' . $validTo . ']';
28
+            $errorMessage = 'Certificate is expired. ['.$validFrom.' - '.$validTo.']';
29 29
             throw new ValidationFailedException($errorMessage);
30
-        } elseif ($certInfo['validTo_time_t'] < strtotime('+' . $this->expireWarningTime . 'days')) {
31
-            $errorMessage = 'Certificate warning, expires in less than ' . $this->expireWarningTime . ' days. Certificate expires at: ' . $validTo;
30
+        } elseif ($certInfo['validTo_time_t'] < strtotime('+'.$this->expireWarningTime.'days')) {
31
+            $errorMessage = 'Certificate warning, expires in less than '.$this->expireWarningTime.' days. Certificate expires at: '.$validTo;
32 32
             throw new ValidationFailedException($errorMessage);
33 33
         }
34 34
     }
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.