@@ -37,6 +37,7 @@ |
||
37 | 37 | |
38 | 38 | /** |
39 | 39 | * @param string |
40 | + * @param \Psr\Http\Message\StreamInterface $body |
|
40 | 41 | * @return array |
41 | 42 | */ |
42 | 43 | private function getLocations($body) { |
@@ -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 |
@@ -21,8 +21,8 @@ |
||
21 | 21 | if (!$success) { |
22 | 22 | $lastError = libxml_get_last_error(); |
23 | 23 | |
24 | - throw new ValidationFailedException('The xml file ' . $response->getUri() . ' is not well formed (last error: ' . |
|
25 | - str_replace("\n", '', $lastError->message) . ').'); |
|
24 | + throw new ValidationFailedException('The xml file '.$response->getUri().' is not well formed (last error: '. |
|
25 | + str_replace("\n", '', $lastError->message).').'); |
|
26 | 26 | } |
27 | 27 | } |
28 | 28 | } |