Completed
Pull Request — master (#90)
by
unknown
03:03
created
src/Rules/Xml/Sitemap/ValidRule.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
     private function getSchema()
17 17
     {
18
-        return __DIR__ . '/' . self::SCHEMA;
18
+        return __DIR__.'/'.self::SCHEMA;
19 19
     }
20 20
 
21 21
     public function validate(Response $response)
@@ -32,17 +32,17 @@  discard block
 block discarded – undo
32 32
             $lastError = libxml_get_last_error();
33 33
             if ($lastError) {
34 34
                 throw new ValidationFailedException(
35
-                    'The given sitemap.xml file is not well formed (last error: ' .
36
-                    str_replace("\n", '', $lastError->message) . ').');
35
+                    'The given sitemap.xml file is not well formed (last error: '.
36
+                    str_replace("\n", '', $lastError->message).').');
37 37
             }
38 38
             $valid = @$dom->schemaValidate($this->getSchema());
39 39
             if (!$valid) {
40 40
                 $lastError = libxml_get_last_error();
41 41
                 $lastErrorMessage = str_replace("\n", '', $lastError->message);
42 42
                 throw new ValidationFailedException(
43
-                    'The given sitemap.xml file did not validate vs. ' .
44
-                    $this->getSchema() . ' (last error: ' .
45
-                    $lastErrorMessage . ').');
43
+                    'The given sitemap.xml file did not validate vs. '.
44
+                    $this->getSchema().' (last error: '.
45
+                    $lastErrorMessage.').');
46 46
             }
47 47
         }
48 48
     }
Please login to merge, or discard this patch.
src/Rules/Xml/XmlCheckRule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,10 +13,10 @@
 block discarded – undo
13 13
     public function doValidation(Response $response)
14 14
     {
15 15
         $domDocument = new \DOMDocument();
16
-        $success = @$domDocument->loadXML((string) $response->getBody());  // true/false
16
+        $success = @$domDocument->loadXML((string) $response->getBody()); // true/false
17 17
 
18 18
         if (!$success) {
19
-            throw new \RuntimeException('XML called from "' . $response->getUri() . '" is not well-formed...');
19
+            throw new \RuntimeException('XML called from "'.$response->getUri().'" is not well-formed...');
20 20
         }
21 21
     }
22 22
 }
Please login to merge, or discard this patch.