Completed
Pull Request — master (#91)
by
unknown
03:41
created
src/Rules/Xml/Sitemap/ValidRule.php 2 patches
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -16,11 +16,18 @@
 block discarded – undo
16 16
 
17 17
     protected $contentTypes = array('text/xml', 'application/xml');
18 18
 
19
+    /**
20
+     * @param boolean $isIndex
21
+     */
19 22
     private function getSchema($isIndex)
20 23
     {
21 24
         return ($isIndex) ?  __DIR__ . '/' . self::INDEX : __DIR__ . '/' . self::SCHEMA;
22 25
     }
23 26
 
27
+    /**
28
+     * @param \Psr\Http\Message\StreamInterface $body
29
+     * @param string $filename
30
+     */
24 31
     private function validateBody($body, $filename, $isIndex = TRUE)
25 32
     {
26 33
         $dom = new \DOMDocument();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
     private function getSchema($isIndex)
20 20
     {
21
-        return ($isIndex) ?  __DIR__ . '/' . self::INDEX : __DIR__ . '/' . self::SCHEMA;
21
+        return ($isIndex) ? __DIR__.'/'.self::INDEX : __DIR__.'/'.self::SCHEMA;
22 22
     }
23 23
 
24 24
     private function validateBody($body, $filename, $isIndex = TRUE)
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         if (!$valid) {
31 31
             $lastError = libxml_get_last_error();
32 32
             throw new ValidationFailedException(
33
-                'The given sitemap file (' . $filename . ') did not validate against the sitemap schema (last error: ' . str_replace("\n", '', $lastError->message) . ').');
33
+                'The given sitemap file ('.$filename.') did not validate against the sitemap schema (last error: '.str_replace("\n", '', $lastError->message).').');
34 34
         }
35 35
     }
36 36
 
Please login to merge, or discard this patch.