@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace whm\Smoke\Rules\Xml; |
4 | 4 | |
5 | -use phm\HttpWebdriverClient\Http\Request\TimeoutAwareRequest; |
|
6 | 5 | use phm\HttpWebdriverClient\Http\Response\DomAwareResponse; |
7 | 6 | use phm\HttpWebdriverClient\Http\Response\TimeoutAwareResponse; |
8 | 7 | use Psr\Http\Message\ResponseInterface; |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | public function doValidation(ResponseInterface $response) |
25 | 25 | { |
26 | 26 | if ($response instanceof DomAwareResponse) { |
27 | - $body = (string)$response->getHtmlBody(); |
|
27 | + $body = (string) $response->getHtmlBody(); |
|
28 | 28 | } else { |
29 | - $body = (string)$response->getBody(); |
|
29 | + $body = (string) $response->getBody(); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | if ($body == "") { |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | $lastError = libxml_get_last_error(); |
46 | 46 | |
47 | 47 | if ($lastError) { |
48 | - throw new ValidationFailedException('The xml file ' . $response->getUri() . ' is not well formed (last error: ' . |
|
49 | - str_replace("\n", '', $lastError->message) . ').'); |
|
48 | + throw new ValidationFailedException('The xml file '.$response->getUri().' is not well formed (last error: '. |
|
49 | + str_replace("\n", '', $lastError->message).').'); |
|
50 | 50 | } else { |
51 | 51 | return new CheckResult(CheckResult::STATUS_FAILURE, 'Unknown error occured.'); |
52 | 52 | } |