@@ -18,18 +18,18 @@ |
||
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 | - $idnUrl = $url->getScheme() . '://' . idn_to_ascii($url->getHost()) . $url->getPath(); |
|
26 | + $idnUrl = $url->getScheme().'://'.idn_to_ascii($url->getHost()).$url->getPath(); |
|
27 | 27 | |
28 | 28 | if (!filter_var($idnUrl, FILTER_VALIDATE_URL)) { |
29 | - $invalidUrls[] = (string)$url; |
|
29 | + $invalidUrls[] = (string) $url; |
|
30 | 30 | } |
31 | 31 | } |
32 | 32 | |
33 | - $this->assert(count($invalidUrls) === 0, 'Invalid urls found (' . implode(', ', $invalidUrls) . ').'); |
|
33 | + $this->assert(count($invalidUrls) === 0, 'Invalid urls found ('.implode(', ', $invalidUrls).').'); |
|
34 | 34 | } |
35 | 35 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | public function doValidation(ResponseInterface $response) |
25 | 25 | { |
26 | - $content = (string)$response->getBody(); |
|
26 | + $content = (string) $response->getBody(); |
|
27 | 27 | |
28 | 28 | $domDocument = new \DOMDocument(); |
29 | 29 | @$domDocument->loadHTML($content); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | try { |
41 | 41 | $selectorAsXPath = $converter->toXPath($selector['pattern']); |
42 | 42 | } catch (\Exception $e) { |
43 | - throw new ValidationFailedException('Invalid css selector (' . $selector['pattern'] . ').'); |
|
43 | + throw new ValidationFailedException('Invalid css selector ('.$selector['pattern'].').'); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | $count = $domXPath->query($selectorAsXPath)->length; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | if ($error === true) { |
55 | 55 | $allNotFoundSelectors = implode('", "', $snotFoundSelectors); |
56 | 56 | |
57 | - throw new ValidationFailedException('CSS Selector "' . $allNotFoundSelectors . '" not found in DOM.'); |
|
57 | + throw new ValidationFailedException('CSS Selector "'.$allNotFoundSelectors.'" not found in DOM.'); |
|
58 | 58 | } |
59 | 59 | } |
60 | 60 | } |