@@ -21,12 +21,12 @@ discard block |
||
21 | 21 | |
22 | 22 | private function getSchema() |
23 | 23 | { |
24 | - return __DIR__ . '/' . self::SCHEMA; |
|
24 | + return __DIR__.'/'.self::SCHEMA; |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | public function doValidation(ResponseInterface $response) |
28 | 28 | { |
29 | - $body = (string)$response->getBody(); |
|
29 | + $body = (string) $response->getBody(); |
|
30 | 30 | if (preg_match('/<rss/', $body)) { |
31 | 31 | libxml_clear_errors(); |
32 | 32 | $dom = new \DOMDocument(); |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | $lastError = libxml_get_last_error(); |
35 | 35 | if ($lastError) { |
36 | 36 | throw new ValidationFailedException( |
37 | - 'The given xml file is not well formed (last error: ' . |
|
38 | - str_replace("\n", '', $lastError->message) . ').'); |
|
37 | + 'The given xml file is not well formed (last error: '. |
|
38 | + str_replace("\n", '', $lastError->message).').'); |
|
39 | 39 | } |
40 | 40 | $valid = @$dom->schemaValidate($this->getSchema()); |
41 | 41 | if (!$valid) { |
@@ -43,11 +43,11 @@ discard block |
||
43 | 43 | $lastErrorMessage = str_replace("\n", '', $lastError->message); |
44 | 44 | |
45 | 45 | if ($response instanceof UriAwareResponse) { |
46 | - $toolUrl = sprintf(self::PUBLIC_SERVICE, urlencode((string)$response->getUri())); |
|
46 | + $toolUrl = sprintf(self::PUBLIC_SERVICE, urlencode((string) $response->getUri())); |
|
47 | 47 | } else { |
48 | 48 | $toolUrl = ''; |
49 | 49 | } |
50 | - return new CheckResult(CheckResult::STATUS_FAILURE, 'The given xml file is not a valid rss file (last error: ' . $lastErrorMessage . ').', null, $toolUrl); |
|
50 | + return new CheckResult(CheckResult::STATUS_FAILURE, 'The given xml file is not a valid rss file (last error: '.$lastErrorMessage.').', null, $toolUrl); |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | return new CheckResult(CheckResult::STATUS_SUCCESS, 'The given rss file is valid.'); |