@@ -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 | } |
@@ -31,9 +31,9 @@ |
||
31 | 31 | |
32 | 32 | if (count($errorList) > 0) { |
33 | 33 | $count = count($errorList); |
34 | - $msg = 'Found ' . $count . ' resources with status code 4xx or 5xx. <ul>'; |
|
34 | + $msg = 'Found '.$count.' resources with status code 4xx or 5xx. <ul>'; |
|
35 | 35 | foreach ($errorList as $error) { |
36 | - $msg .= '<li>' . $error['name'] . ' (' . $error['http_status'] . ')</li>'; |
|
36 | + $msg .= '<li>'.$error['name'].' ('.$error['http_status'].')</li>'; |
|
37 | 37 | } |
38 | 38 | $msg .= '</ul>'; |
39 | 39 | return new CheckResult(CheckResult::STATUS_FAILURE, $msg, $count); |