@@ -30,13 +30,13 @@ discard block |
||
| 30 | 30 | private function getSchema($isIndex) |
| 31 | 31 | { |
| 32 | 32 | if ($isIndex) { |
| 33 | - return __DIR__ . '/' . self::INDEX; |
|
| 33 | + return __DIR__.'/'.self::INDEX; |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | if ($this->strictMode) { |
| 37 | - return __DIR__ . '/' . self::SCHEMA; |
|
| 37 | + return __DIR__.'/'.self::SCHEMA; |
|
| 38 | 38 | } else { |
| 39 | - return __DIR__ . '/' . self::NON_STRICT_SCHEMA; |
|
| 39 | + return __DIR__.'/'.self::NON_STRICT_SCHEMA; |
|
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | if (!$valid) { |
| 57 | 57 | $lastError = libxml_get_last_error(); |
| 58 | 58 | throw new ValidationFailedException( |
| 59 | - 'The given sitemap file (' . $filename . ') did not validate against the sitemap schema (last error: ' . str_replace("\n", '', $lastError->message) . ').'); |
|
| 59 | + 'The given sitemap file ('.$filename.') did not validate against the sitemap schema (last error: '.str_replace("\n", '', $lastError->message).').'); |
|
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | |
@@ -69,9 +69,9 @@ discard block |
||
| 69 | 69 | $contentType = $response->getHeader('content-type'); |
| 70 | 70 | |
| 71 | 71 | if ($response instanceof DomAwareResponse) { |
| 72 | - $body = (string)$response->getHtmlBody(); |
|
| 72 | + $body = (string) $response->getHtmlBody(); |
|
| 73 | 73 | } else { |
| 74 | - $body = (string)$response->getBody(); |
|
| 74 | + $body = (string) $response->getBody(); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | if (is_array($contentType) && $contentType[0] === "application/gzip") { |
@@ -80,9 +80,9 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | // sitemapindex or urlset |
| 82 | 82 | if (preg_match('/<sitemapindex/', $body)) { |
| 83 | - $this->validateBody($body, (string)$response->getUri()); |
|
| 83 | + $this->validateBody($body, (string) $response->getUri()); |
|
| 84 | 84 | } elseif (preg_match('/<urlset/', $body)) { |
| 85 | - $this->validateBody($body, (string)$response->getUri(), false); |
|
| 85 | + $this->validateBody($body, (string) $response->getUri(), false); |
|
| 86 | 86 | } else { |
| 87 | 87 | throw new ValidationFailedException('The given document is not a valid sitemap. Nether sitemapindex nor urlset element was found. '); |
| 88 | 88 | } |