@@ -13,12 +13,12 @@ |
||
13 | 13 | public function doValidation(Response $response) |
14 | 14 | { |
15 | 15 | $domDocument = new \DOMDocument(); |
16 | - $success = @$domDocument->loadXML((string) $response->getBody()); // true/false |
|
16 | + $success = @$domDocument->loadXML((string) $response->getBody()); // true/false |
|
17 | 17 | |
18 | 18 | $lastError = libxml_get_last_error(); |
19 | 19 | if (!$success || $lastError) { |
20 | - throw new \RuntimeException('The xml file ' . $response->getUri() . ' is not well formed (last error: ' . |
|
21 | - str_replace("\n", '', $lastError->message) . ').'); |
|
20 | + throw new \RuntimeException('The xml file '.$response->getUri().' is not well formed (last error: '. |
|
21 | + str_replace("\n", '', $lastError->message).').'); |
|
22 | 22 | } |
23 | 23 | } |
24 | 24 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | |
19 | 19 | private function getSchema() |
20 | 20 | { |
21 | - return __DIR__ . '/' . self::SCHEMA; |
|
21 | + return __DIR__.'/'.self::SCHEMA; |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | private function validateBody($body, $filename) |
@@ -29,13 +29,13 @@ discard block |
||
29 | 29 | $lastError = libxml_get_last_error(); |
30 | 30 | if ($lastError) { |
31 | 31 | throw new ValidationFailedException( |
32 | - 'The given sitemap file (' . $filename . ') is not well formed (last error: ' . str_replace("\n", '', $lastError->message) . ').'); |
|
32 | + 'The given sitemap file ('.$filename.') is not well formed (last error: '.str_replace("\n", '', $lastError->message).').'); |
|
33 | 33 | } |
34 | 34 | $valid = @$dom->schemaValidate($this->getSchema()); |
35 | 35 | if (!$valid) { |
36 | 36 | $lastError = libxml_get_last_error(); |
37 | 37 | throw new ValidationFailedException( |
38 | - 'The given sitemap file (' . $filename . ') did not validate against the sitemap.xsd (last error: ' . str_replace("\n", '', $lastError->message) . ').'); |
|
38 | + 'The given sitemap file ('.$filename.') did not validate against the sitemap.xsd (last error: '.str_replace("\n", '', $lastError->message).').'); |
|
39 | 39 | } |
40 | 40 | } |
41 | 41 |