@@ -18,19 +18,19 @@ |
||
| 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 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 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 |
||
| 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)); |