Completed
Push — master ( 6b2d7c...9b8114 )
by Nils
02:18
created
src/Rules/Json/JsonSchema/JsonSchemaRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $data = json_decode($response->getBody());
38 38
         if ($data === null) {
39
-            throw new ValidationFailedException("The given JSON data can not be validated (last error: '" . $this->json_errors[json_last_error()] . "').");
39
+            throw new ValidationFailedException("The given JSON data can not be validated (last error: '".$this->json_errors[json_last_error()]."').");
40 40
         } else {
41 41
             $error = false;
42 42
             $messageParts = array();
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
                     $error = true;
54 54
                     $errorMessage = '';
55 55
                     foreach ($validator->getErrors() as $error) {
56
-                        $errorMessage = $errorMessage . sprintf("[%s] %s\n", $error['property'], $error['message']);
56
+                        $errorMessage = $errorMessage.sprintf("[%s] %s\n", $error['property'], $error['message']);
57 57
                     }
58
-                    $messageParts[] = $jsonSchemaFile['jsonschemafilename'] . ' - ' . $jsonSchemaFile['jsonschemafileurl'] . '(last error: ' . $errorMessage . ').';
58
+                    $messageParts[] = $jsonSchemaFile['jsonschemafilename'].' - '.$jsonSchemaFile['jsonschemafileurl'].'(last error: '.$errorMessage.').';
59 59
                 }
60 60
             }
61 61
 
62 62
             if ($error === true) {
63
-                $message = 'JSON file (' . (string) $response->getUri() . ')  does not validate against the following JSON Schema files: ' . implode(', ', $messageParts);
63
+                $message = 'JSON file ('.(string) $response->getUri().')  does not validate against the following JSON Schema files: '.implode(', ', $messageParts);
64 64
                 throw new ValidationFailedException($message);
65 65
             }
66 66
         }
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 where 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/ClosingHtmlTagRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     {
16 16
         if (($response->getStatus() < 300 || $response->getStatus() >= 400) && $response->getContentType() === 'text/html') {
17 17
             if (stripos($response->getBody(), '</html>') === false) {
18
-                throw new ValidationFailedException('Closing html tag is missing (document lengh: ' . strlen($response->getBody()) . ').');
18
+                throw new ValidationFailedException('Closing html tag is missing (document lengh: '.strlen($response->getBody()).').');
19 19
             }
20 20
         }
21 21
     }
Please login to merge, or discard this patch.
src/Rules/Http/DurationRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     public function validate(Response $response)
26 26
     {
27 27
         if ($response->getDuration() > $this->maxDuration) {
28
-            throw new ValidationFailedException('The http request took ' . $response->getDuration() . ' milliseconds (limit was ' . $this->maxDuration . 'ms). ');
28
+            throw new ValidationFailedException('The http request took '.$response->getDuration().' milliseconds (limit was '.$this->maxDuration.'ms). ');
29 29
         }
30 30
     }
31 31
 }
Please login to merge, or discard this patch.
src/Rules/Seo/GoogleMobileFriendlyRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@
 block discarded – undo
35 35
         var_dump($result);
36 36
 
37 37
         if ($result->error) {
38
-            throw new ValidationFailedException('Google mobile friendly test was not passed. Error "' . $result->error->message . '"');
38
+            throw new ValidationFailedException('Google mobile friendly test was not passed. Error "'.$result->error->message.'"');
39 39
         }
40 40
 
41 41
         $passResult = $result->ruleGroups->USABILITY;
42 42
 
43 43
         if (!$passResult->pass) {
44
-            throw new ValidationFailedException('Google mobile friendly test was not passed. Score ' . $passResult->score . '/100.');
44
+            throw new ValidationFailedException('Google mobile friendly test was not passed. Score '.$passResult->score.'/100.');
45 45
         }
46 46
     }
47 47
 }
Please login to merge, or discard this patch.
src/Extensions/CookieMaker/CookieMakerExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
         $this->sessionContainer = new SessionContainer();
21 21
 
22 22
         foreach ($sessions as $sessionName => $session) {
23
-            $command = $this->executable . " '" . json_encode($session) . "'";
23
+            $command = $this->executable." '".json_encode($session)."'";
24 24
 
25 25
             exec($command, $output, $return);
26 26
 
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
@@ -20,12 +20,12 @@  discard block
 block discarded – undo
20 20
 
21 21
     public function validate(Response $response)
22 22
     {
23
-        $url = $response->getUri()->getScheme() . '://' . $response->getUri()->getHost();
23
+        $url = $response->getUri()->getScheme().'://'.$response->getUri()->getHost();
24 24
 
25 25
         if (substr_count($url, '/') === 2) {
26
-            $filename = $robotsUrl = $url . '/robots.txt';
26
+            $filename = $robotsUrl = $url.'/robots.txt';
27 27
         } elseif (substr_count($url, '/') === 3) {
28
-            $filename = $robotsUrl = $url . 'robots.txt';
28
+            $filename = $robotsUrl = $url.'robots.txt';
29 29
         } else {
30 30
             return;
31 31
         }
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
         $normalizedContent = $this->normalizeContent($content);
42 42
 
43
-        if (strpos($normalizedContent, 'user-agent:* disallow:/' . PHP_EOL) !== false) {
43
+        if (strpos($normalizedContent, 'user-agent:* disallow:/'.PHP_EOL) !== false) {
44 44
             throw new ValidationFailedException('The robots.txt contains disallow all (Disallow: /)');
45 45
         }
46 46
 
Please login to merge, or discard this patch.