Completed
Push — master ( 49c739...27fd09 )
by Nils
02:05
created
src/Rules/Html/InvalidUrlsRule.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,19 +18,19 @@
 block discarded – undo
18 18
      */
19 19
     protected function doValidation(ResponseInterface $response)
20 20
     {
21
-        $document = new Document((string)$response->getBody(), false);
21
+        $document = new Document((string) $response->getBody(), false);
22 22
         $urls = $document->getDependencies($response->getUri());
23 23
         $invalidUrls = array();
24 24
 
25 25
         foreach ($urls as $url) {
26 26
 
27
-            $idnUrl = $url->getScheme() . '://' . idn_to_ascii($url->getHost()) .  $url->getPath();
27
+            $idnUrl = $url->getScheme().'://'.idn_to_ascii($url->getHost()).$url->getPath();
28 28
 
29 29
             if (!filter_var($idnUrl, FILTER_VALIDATE_URL)) {
30
-                $invalidUrls[] = (string)$url;
30
+                $invalidUrls[] = (string) $url;
31 31
             }
32 32
         }
33 33
 
34
-        $this->assert(count($invalidUrls) === 0, 'Invalid urls found (' . implode(', ', $invalidUrls) . ').');
34
+        $this->assert(count($invalidUrls) === 0, 'Invalid urls found ('.implode(', ', $invalidUrls).').');
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
src/Rules/Html/InsecureContentRule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             return;
45 45
         }
46 46
 
47
-        $htmlDocument = new Document((string)$response->getBody());
47
+        $htmlDocument = new Document((string) $response->getBody());
48 48
 
49 49
         $resources = $htmlDocument->getDependencies($uri, false);
50 50
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             if ($resource->getScheme() && 'https' !== $resource->getScheme()) {
55 55
                 $excluded = false;
56 56
                 foreach ($this->excludedFiles as $excludedFile) {
57
-                    if (preg_match('~' . $excludedFile . '~', (string)$resource)) {
57
+                    if (preg_match('~'.$excludedFile.'~', (string) $resource)) {
58 58
                         $excluded = true;
59 59
                         break;
60 60
                     }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         if (count($unsecures) > 0) {
69 69
             $message = 'At least one dependency was found on a secure url, that was transfered insecure.<ul>';
70 70
             foreach ($unsecures as $unsecure) {
71
-                $message .= '<li>' . (string)$unsecure . '</li>';
71
+                $message .= '<li>'.(string) $unsecure.'</li>';
72 72
             }
73 73
             $message .= '</ul>';
74 74
             return new CheckResult(CheckResult::STATUS_FAILURE, $message, count($unsecures));
Please login to merge, or discard this patch.