@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | private function getSchema() |
17 | 17 | { |
18 | - return __DIR__ . '/' . self::SCHEMA; |
|
18 | + return __DIR__.'/'.self::SCHEMA; |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | public function validate(Response $response) |
@@ -32,17 +32,17 @@ discard block |
||
32 | 32 | $lastError = libxml_get_last_error(); |
33 | 33 | if ($lastError) { |
34 | 34 | throw new ValidationFailedException( |
35 | - 'The given sitemap.xml file is not well formed (last error: ' . |
|
36 | - str_replace("\n", '', $lastError->message) . ').'); |
|
35 | + 'The given sitemap.xml file is not well formed (last error: '. |
|
36 | + str_replace("\n", '', $lastError->message).').'); |
|
37 | 37 | } |
38 | 38 | $valid = @$dom->schemaValidate($this->getSchema()); |
39 | 39 | if (!$valid) { |
40 | 40 | $lastError = libxml_get_last_error(); |
41 | 41 | $lastErrorMessage = str_replace("\n", '', $lastError->message); |
42 | 42 | throw new ValidationFailedException( |
43 | - 'The given sitemap.xml file did not validate vs. ' . |
|
44 | - $this->getSchema() . ' (last error: ' . |
|
45 | - $lastErrorMessage . ').'); |
|
43 | + 'The given sitemap.xml file did not validate vs. '. |
|
44 | + $this->getSchema().' (last error: '. |
|
45 | + $lastErrorMessage.').'); |
|
46 | 46 | } |
47 | 47 | } |
48 | 48 | } |
@@ -13,10 +13,10 @@ |
||
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 | if (!$success) { |
19 | - throw new \RuntimeException('XML called from "' . $response->getUri() . '" is not well-formed...'); |
|
19 | + throw new \RuntimeException('XML called from "'.$response->getUri().'" is not well-formed...'); |
|
20 | 20 | } |
21 | 21 | } |
22 | 22 | } |