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