Completed
Push — master ( 2cf922...c5787e )
by Nils
01:47
created
src/Rules/Xml/Rss/ValidRule.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace whm\Smoke\Rules\Xml\Rss;
4 4
 
5 5
 use Psr\Http\Message\ResponseInterface;
6
-use whm\Smoke\Rules\Rule;
7 6
 use whm\Smoke\Rules\StandardRule;
8 7
 use whm\Smoke\Rules\ValidationFailedException;
9 8
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
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,17 +31,17 @@  discard block
 block discarded – undo
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 did not validate against ' .
43
-                    $this->getSchema() . ' (last error: ' .
44
-                    $lastErrorMessage . ').');
42
+                    'The given xml file did not validate against '.
43
+                    $this->getSchema().' (last error: '.
44
+                    $lastErrorMessage.').');
45 45
             }
46 46
         }
47 47
     }
Please login to merge, or discard this patch.