Completed
Push — master ( 666314...1e0ab2 )
by Nils
06:28 queued 04:12
created
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/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/Rules/Xml/XmlCheckRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
         if (!$success) {
22 22
             $lastError = libxml_get_last_error();
23 23
 
24
-            throw new ValidationFailedException('The xml file ' . $response->getUri() . ' is not well formed (last error: ' .
25
-                str_replace("\n", '', $lastError->message) . ').');
24
+            throw new ValidationFailedException('The xml file '.$response->getUri().' is not well formed (last error: '.
25
+                str_replace("\n", '', $lastError->message).').');
26 26
         }
27 27
     }
28 28
 }
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
@@ -65,17 +65,17 @@
 block discarded – undo
65 65
 
66 66
             if ($jsonValue === FALSE || (is_array($jsonValue) && empty($jsonValue))) {
67 67
                 $error = true;
68
-                $noCorrectJsonPaths[] = $path['pattern'] . ' (JSON Path not found)';
68
+                $noCorrectJsonPaths[] = $path['pattern'].' (JSON Path not found)';
69 69
             }
70 70
             if ($this->checkRelation($path['relation'], $path['value'], $count) === false) {
71 71
                 $error = true;
72
-                $noCorrectJsonPaths[] = $path['pattern'] . ' (number of JSONPaths is not correct corresponding to the given relation/value)';
72
+                $noCorrectJsonPaths[] = $path['pattern'].' (number of JSONPaths is not correct corresponding to the given relation/value)';
73 73
             }
74 74
         }
75 75
 
76 76
         if ($error === true) {
77 77
             $allNoCorrectJsonPaths = implode('", "', $noCorrectJsonPaths);
78
-            throw new ValidationFailedException('Disonances with JSON Paths "' . $allNoCorrectJsonPaths . '!');
78
+            throw new ValidationFailedException('Disonances with JSON Paths "'.$allNoCorrectJsonPaths.'!');
79 79
         }
80 80
     }
81 81
 }
Please login to merge, or discard this patch.
src/Rules/Xml/Sitemap/ValidRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@  discard block
 block discarded – undo
29 29
     private function getSchema($isIndex)
30 30
     {
31 31
         if ($isIndex) {
32
-            return __DIR__ . '/' . self::INDEX;
32
+            return __DIR__.'/'.self::INDEX;
33 33
         }
34 34
 
35 35
         if ($this->strictMode) {
36
-            return __DIR__ . '/' . self::SCHEMA;
36
+            return __DIR__.'/'.self::SCHEMA;
37 37
         } else {
38
-            return __DIR__ . '/' . self::NON_STRICT_SCHEMA;
38
+            return __DIR__.'/'.self::NON_STRICT_SCHEMA;
39 39
         }
40 40
     }
41 41
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         if (!$valid) {
50 50
             $lastError = libxml_get_last_error();
51 51
             throw new ValidationFailedException(
52
-                'The given sitemap file (' . $filename . ') did not validate against the sitemap schema (last error: ' . str_replace("\n", '', $lastError->message) . ').');
52
+                'The given sitemap file ('.$filename.') did not validate against the sitemap schema (last error: '.str_replace("\n", '', $lastError->message).').');
53 53
         }
54 54
     }
55 55
 
Please login to merge, or discard this patch.
src/Rules/Html/CssSelectorExistsRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         if ($error === true) {
47 47
             $allNotFoundSelectors = implode('", "', $snotFoundSelectors);
48 48
 
49
-            throw new ValidationFailedException('CSS Selector "' . $allNotFoundSelectors . '" not found in DOM.');
49
+            throw new ValidationFailedException('CSS Selector "'.$allNotFoundSelectors.'" not found in DOM.');
50 50
         }
51 51
     }
52 52
 }
Please login to merge, or discard this patch.
src/Rules/Seo/RobotsDisallowAllRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@  discard block
 block discarded – undo
13 13
 {
14 14
     public function validate(Response $response)
15 15
     {
16
-        $url = $response->getUri()->getScheme() . '://' . $response->getUri()->getHost();
16
+        $url = $response->getUri()->getScheme().'://'.$response->getUri()->getHost();
17 17
 
18 18
         if (substr_count($url, '/') === 2) {
19
-            $filename = $robotsUrl = $url . '/robots.txt';
19
+            $filename = $robotsUrl = $url.'/robots.txt';
20 20
         } elseif (substr_count($url, '/') === 3) {
21
-            $filename = $robotsUrl = $url . 'robots.txt';
21
+            $filename = $robotsUrl = $url.'robots.txt';
22 22
         } else {
23 23
             return;
24 24
         }
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
             $content = file_get_contents($filename);
31 31
             $normalizedContent = strtolower(str_replace(' ', '', $content));
32 32
 
33
-            if (strpos($normalizedContent, 'disallow:/' . PHP_EOL) !== false) {
33
+            if (strpos($normalizedContent, 'disallow:/'.PHP_EOL) !== false) {
34 34
                 throw new ValidationFailedException('The robots.txt contains disallow all (Disallow: /)');
35 35
             }
36 36
 
Please login to merge, or discard this patch.