@@ -16,11 +16,18 @@ |
||
| 16 | 16 | |
| 17 | 17 | protected $contentTypes = array('text/xml', 'application/xml'); |
| 18 | 18 | |
| 19 | + /** |
|
| 20 | + * @param boolean $isIndex |
|
| 21 | + */ |
|
| 19 | 22 | private function getSchema($isIndex) |
| 20 | 23 | { |
| 21 | 24 | return ($isIndex) ? __DIR__ . '/' . self::INDEX : __DIR__ . '/' . self::SCHEMA; |
| 22 | 25 | } |
| 23 | 26 | |
| 27 | + /** |
|
| 28 | + * @param \Psr\Http\Message\StreamInterface $body |
|
| 29 | + * @param string $filename |
|
| 30 | + */ |
|
| 24 | 31 | private function validateBody($body, $filename, $isIndex = TRUE) |
| 25 | 32 | { |
| 26 | 33 | $dom = new \DOMDocument(); |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | private function getSchema($isIndex) |
| 20 | 20 | { |
| 21 | - return ($isIndex) ? __DIR__ . '/' . self::INDEX : __DIR__ . '/' . self::SCHEMA; |
|
| 21 | + return ($isIndex) ? __DIR__.'/'.self::INDEX : __DIR__.'/'.self::SCHEMA; |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | private function validateBody($body, $filename, $isIndex = TRUE) |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | if (!$valid) { |
| 31 | 31 | $lastError = libxml_get_last_error(); |
| 32 | 32 | throw new ValidationFailedException( |
| 33 | - 'The given sitemap file (' . $filename . ') did not validate against the sitemap schema (last error: ' . str_replace("\n", '', $lastError->message) . ').'); |
|
| 33 | + 'The given sitemap file ('.$filename.') did not validate against the sitemap schema (last error: '.str_replace("\n", '', $lastError->message).').'); |
|
| 34 | 34 | } |
| 35 | 35 | } |
| 36 | 36 | |