Completed
Push — master ( 33a55e...ca53a0 )
by Nils
07:47
created
src/Rules/Seo/RobotsDisallowAllRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,12 +21,12 @@  discard block
 block discarded – undo
21 21
 
22 22
     public function validate(ResponseInterface $response)
23 23
     {
24
-        $url = $response->getUri()->getScheme() . '://' . $response->getUri()->getHost();
24
+        $url = $response->getUri()->getScheme().'://'.$response->getUri()->getHost();
25 25
 
26 26
         if (substr_count($url, '/') === 2) {
27
-            $filename = $robotsUrl = $url . '/robots.txt';
27
+            $filename = $robotsUrl = $url.'/robots.txt';
28 28
         } elseif (substr_count($url, '/') === 3) {
29
-            $filename = $robotsUrl = $url . 'robots.txt';
29
+            $filename = $robotsUrl = $url.'robots.txt';
30 30
         } else {
31 31
             return;
32 32
         }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
         $normalizedContent = $this->normalizeContent($content);
41 41
 
42
-        if (strpos($normalizedContent, 'user-agent:* disallow:/' . PHP_EOL) !== false) {
42
+        if (strpos($normalizedContent, 'user-agent:* disallow:/'.PHP_EOL) !== false) {
43 43
             throw new ValidationFailedException('The robots.txt contains disallow all (Disallow: /)');
44 44
         }
45 45
 
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
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
     private function getEndpoint(Uri $uri)
16 16
     {
17
-        return str_replace('#url#', urlencode((string)$uri), self::ENDPOINT);
17
+        return str_replace('#url#', urlencode((string) $uri), self::ENDPOINT);
18 18
     }
19 19
 
20 20
     public function validate(ResponseInterface $response)
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             )));
34 34
 
35 35
         if (property_exists($result, 'error')) {
36
-            $checkResult = new CheckResult(CheckResult::STATUS_FAILURE, 'Google mobile friendly test was not passed. Error "' . $result->error->message . '"');
36
+            $checkResult = new CheckResult(CheckResult::STATUS_FAILURE, 'Google mobile friendly test was not passed. Error "'.$result->error->message.'"');
37 37
             $checkResult->addAttribute(new Attribute('Google response', json_encode($result), true));
38 38
             return $checkResult;
39 39
         }
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
         $passResult = $result->ruleGroups->USABILITY;
42 42
 
43 43
         if (!$passResult->pass) {
44
-            return new CheckResult(CheckResult::STATUS_FAILURE, 'Google mobile friendly test was not passed. Score ' . $passResult->score . '/100.', (int)$passResult->score);
44
+            return new CheckResult(CheckResult::STATUS_FAILURE, 'Google mobile friendly test was not passed. Score '.$passResult->score.'/100.', (int) $passResult->score);
45 45
         }
46 46
 
47
-        return new CheckResult(CheckResult::STATUS_SUCCESS, 'Google mobile friendly test passed. Score ' . $passResult->score . '/100.', (int)$passResult->score);
47
+        return new CheckResult(CheckResult::STATUS_SUCCESS, 'Google mobile friendly test passed. Score '.$passResult->score.'/100.', (int) $passResult->score);
48 48
     }
49 49
 }
Please login to merge, or discard this patch.
src/Config/Configuration.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     private function initConfigArray(array $configArray, array $defaultSettings = null)
66 66
     {
67 67
         if ($defaultSettings === null) {
68
-            $defaultSettings = Yaml::parse(file_get_contents(__DIR__ . '/../settings/' . self::DEFAULT_SETTINGS));
68
+            $defaultSettings = Yaml::parse(file_get_contents(__DIR__.'/../settings/'.self::DEFAULT_SETTINGS));
69 69
         }
70 70
 
71 71
         if (count($configArray) === 0) {
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         if ($this->hasSection($section)) {
168 168
             return $this->configArray[$section];
169 169
         } else {
170
-            throw new \RuntimeException('The section (' . $section . ') you are trying to access does not exist.');
170
+            throw new \RuntimeException('The section ('.$section.') you are trying to access does not exist.');
171 171
         }
172 172
     }
173 173
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         if (array_key_exists($name, $this->extensions)) {
177 177
             return $this->extensions[$name];
178 178
         } else {
179
-            throw new \RuntimeException('The extension ("' . $name . '") you are trying to access does not exist. Registered extensions are: ' . implode(' ,', array_keys($this->extensions)) . '.');
179
+            throw new \RuntimeException('The extension ("'.$name.'") you are trying to access does not exist. Registered extensions are: '.implode(' ,', array_keys($this->extensions)).'.');
180 180
         }
181 181
     }
182 182
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
             try {
202 202
                 $client = Init::initialize($this->configArray['client']);
203 203
             } catch (\Exception $e) {
204
-                throw new ConfigurationException('Error initializing client (' . $e->getMessage() . ')');
204
+                throw new ConfigurationException('Error initializing client ('.$e->getMessage().')');
205 205
             }
206 206
 
207 207
             if (array_key_exists('cache', $this->configArray['client'])) {
Please login to merge, or discard this patch.
src/Cli/Command/SmokeCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
      */
56 56
     protected function writeSmokeCredentials($url = null)
57 57
     {
58
-        $this->output->writeln("\n Smoke " . SMOKE_VERSION . " by Nils Langner\n");
58
+        $this->output->writeln("\n Smoke ".SMOKE_VERSION." by Nils Langner\n");
59 59
 
60 60
         if ($url) {
61
-            $this->output->writeln(' <info>Scanning ' . $url . "</info>\n");
61
+            $this->output->writeln(' <info>Scanning '.$url."</info>\n");
62 62
         }
63 63
     }
64 64
 
@@ -88,12 +88,12 @@  discard block
 block discarded – undo
88 88
         if ($configFile) {
89 89
             if (strpos($configFile, 'http://') === 0 || strpos($configFile, 'https://') === 0) {
90 90
                 $curlClient = new CurlHttpAdapter();
91
-                $fileContent = (string)$curlClient->get($configFile)->getBody();
91
+                $fileContent = (string) $curlClient->get($configFile)->getBody();
92 92
             } else {
93 93
                 if (file_exists($configFile)) {
94 94
                     $fileContent = file_get_contents($configFile);
95 95
                 } else {
96
-                    throw new \RuntimeException("Config file was not found ('" . $configFile . "').");
96
+                    throw new \RuntimeException("Config file was not found ('".$configFile."').");
97 97
                 }
98 98
             }
99 99
             $configArray = EnvAwareYaml::parse($fileContent);
Please login to merge, or discard this patch.