Completed
Push — master ( 6b2d7c...9b8114 )
by Nils
02:18
created
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/Rules/Seo/RobotsDisallowAllRule.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -49,6 +49,9 @@
 block discarded – undo
49 49
         }
50 50
     }
51 51
 
52
+    /**
53
+     * @param string $content
54
+     */
52 55
     private function normalizeContent($content)
53 56
     {
54 57
         $normalizedContent = strtolower($content);
Please login to merge, or discard this 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.