Completed
Push — master ( 1f85a6...563d08 )
by Nils
01:41
created
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
 
16 16
     private function getEndpoint(UriInterface $uri)
17 17
     {
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(ResponseInterface $response)
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             )));
39 39
 
40 40
         if (property_exists($result, 'error')) {
41
-            $checkResult = new CheckResult(CheckResult::STATUS_FAILURE, 'Google mobile friendly test was not passed. Error "' . $result->error->message . '"');
41
+            $checkResult = new CheckResult(CheckResult::STATUS_FAILURE, 'Google mobile friendly test was not passed. Error "'.$result->error->message.'"');
42 42
             $checkResult->addAttribute(new Attribute('Google response', json_encode($result), true));
43 43
             return $checkResult;
44 44
         }
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
         $passResult = $result->ruleGroups->USABILITY;
47 47
 
48 48
         if (!$passResult->pass) {
49
-            $result = new CheckResult(CheckResult::STATUS_FAILURE, 'Google mobile friendly test was not passed. Score ' . $passResult->score . '/100.', (int)$passResult->score);
49
+            $result = new CheckResult(CheckResult::STATUS_FAILURE, 'Google mobile friendly test was not passed. Score '.$passResult->score.'/100.', (int) $passResult->score);
50 50
 
51 51
         } else {
52
-            $result = new CheckResult(CheckResult::STATUS_SUCCESS, 'Google mobile friendly test passed. Score ' . $passResult->score . '/100.', (int)$passResult->score);
52
+            $result = new CheckResult(CheckResult::STATUS_SUCCESS, 'Google mobile friendly test passed. Score '.$passResult->score.'/100.', (int) $passResult->score);
53 53
         }
54 54
 
55 55
         $result->addAttribute(new Attribute('google_result', json_encode($result), true));
Please login to merge, or discard this patch.
src/Http/GuzzleClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      */
22 22
     public function init($nocache = true, $clientTimeout = 20000)
23 23
     {
24
-        $timeoutInSeconds = (int)($clientTimeout / 1000);
24
+        $timeoutInSeconds = (int) ($clientTimeout / 1000);
25 25
 
26 26
         if ($nocache) {
27 27
             $this->guzzleClient = new phmGuzzleClient(null, $timeoutInSeconds);
Please login to merge, or discard this patch.
src/Rules/Xml/Sitemap/ValidRule.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
     private function getSchema($isIndex)
35 35
     {
36 36
         if ($isIndex) {
37
-            return __DIR__ . '/' . self::INDEX;
37
+            return __DIR__.'/'.self::INDEX;
38 38
         }
39 39
 
40 40
         if ($this->strictMode) {
41
-            return __DIR__ . '/' . self::SCHEMA;
41
+            return __DIR__.'/'.self::SCHEMA;
42 42
         } else {
43
-            return __DIR__ . '/' . self::NON_STRICT_SCHEMA;
43
+            return __DIR__.'/'.self::NON_STRICT_SCHEMA;
44 44
         }
45 45
     }
46 46
 
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
 
66 66
         if (!$valid) {
67 67
             $lastError = libxml_get_last_error();
68
-            $message = 'The given sitemap file (' . $filename . ') did not validate against the sitemap schema (last error: ' . str_replace("\n", '', $lastError->message) . ').';
68
+            $message = 'The given sitemap file ('.$filename.') did not validate against the sitemap schema (last error: '.str_replace("\n", '', $lastError->message).').';
69 69
             return new CheckResult(CheckResult::STATUS_FAILURE, $message);
70 70
         } else {
71
-            $message = 'The given sitemap file (' . $filename . ') is valid.';
71
+            $message = 'The given sitemap file ('.$filename.') is valid.';
72 72
             return new CheckResult(CheckResult::STATUS_SUCCESS, $message);
73 73
 
74 74
         }
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
     protected function doValidation(ResponseInterface $response)
82 82
     {
83 83
         if ($response instanceof DomAwareResponse) {
84
-            $body = (string)$response->getHtmlBody();
84
+            $body = (string) $response->getHtmlBody();
85 85
         } else {
86
-            $body = (string)$response->getBody();
86
+            $body = (string) $response->getBody();
87 87
         }
88 88
 
89 89
         if ($response->hasHeader('content-type')) {
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
 
96 96
         // sitemapindex or urlset
97 97
         if (preg_match('/<sitemapindex/', $body)) {
98
-            return $this->validateBody($body, (string)$response->getUri(), true);
98
+            return $this->validateBody($body, (string) $response->getUri(), true);
99 99
         } elseif (preg_match('/<urlset/', $body)) {
100
-            return $this->validateBody($body, (string)$response->getUri(), false);
100
+            return $this->validateBody($body, (string) $response->getUri(), false);
101 101
         } else {
102 102
             throw new ValidationFailedException('The given document is not a valid sitemap. Nether sitemapindex nor urlset element was found. ');
103 103
         }
Please login to merge, or discard this patch.