@@ -18,12 +18,12 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | private function getSchema() |
| 20 | 20 | { |
| 21 | - return __DIR__ . '/' . self::SCHEMA; |
|
| 21 | + return __DIR__.'/'.self::SCHEMA; |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | public function doValidation(ResponseInterface $response) |
| 25 | 25 | { |
| 26 | - $body = (string)$response->getBody(); |
|
| 26 | + $body = (string) $response->getBody(); |
|
| 27 | 27 | if (preg_match('/<rss/', $body)) { |
| 28 | 28 | libxml_clear_errors(); |
| 29 | 29 | $dom = new \DOMDocument(); |
@@ -31,16 +31,16 @@ discard block |
||
| 31 | 31 | $lastError = libxml_get_last_error(); |
| 32 | 32 | if ($lastError) { |
| 33 | 33 | throw new ValidationFailedException( |
| 34 | - 'The given xml file is not well formed (last error: ' . |
|
| 35 | - str_replace("\n", '', $lastError->message) . ').'); |
|
| 34 | + 'The given xml file is not well formed (last error: '. |
|
| 35 | + str_replace("\n", '', $lastError->message).').'); |
|
| 36 | 36 | } |
| 37 | 37 | $valid = @$dom->schemaValidate($this->getSchema()); |
| 38 | 38 | if (!$valid) { |
| 39 | 39 | $lastError = libxml_get_last_error(); |
| 40 | 40 | $lastErrorMessage = str_replace("\n", '', $lastError->message); |
| 41 | 41 | throw new ValidationFailedException( |
| 42 | - 'The given xml file is not a valid rss file (last error: ' . |
|
| 43 | - $lastErrorMessage . ').'); |
|
| 42 | + 'The given xml file is not a valid rss file (last error: '. |
|
| 43 | + $lastErrorMessage.').'); |
|
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | } |