@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | return true; |
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 |
||
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 |
||
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)); |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | if ($response instanceof ContentTypeAwareResponse) { |
18 | 18 | |
19 | 19 | // @todo this could be part of the StandardRule class |
20 | - $body = (string)$response->getBody(); |
|
20 | + $body = (string) $response->getBody(); |
|
21 | 21 | $body = preg_replace('/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F,\xFF,\x8B]/', '', $body); |
22 | 22 | |
23 | 23 | if (($response->getStatusCode() < 300 || $response->getStatusCode() >= 400) |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | && strlen($body) > 0 |
26 | 26 | ) { |
27 | 27 | if (stripos($body, '</html>') === false) { |
28 | - throw new ValidationFailedException('Closing html tag is missing (document length: ' . strlen($body) . ').'); |
|
28 | + throw new ValidationFailedException('Closing html tag is missing (document length: '.strlen($body).').'); |
|
29 | 29 | } |
30 | 30 | } |
31 | 31 | } |