|  | @@ -32,16 +32,16 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 32 | 32 |   | 
                                                                                                            
                                                            | 33 | 33 |      private function generateSitemap($baseUrl) | 
                                                                                                            
                                                            | 34 | 34 |      { | 
                                                                                                            
                                                            | 35 |  | -        $sitemap = new Sitemap($this->jigsaw->getDestinationPath().'/sitemap.xml'); | 
                                                                                                            
                                                            |  | 35 | +        $sitemap = new Sitemap($this->jigsaw->getDestinationPath() . '/sitemap.xml'); | 
                                                                                                            
                                                            | 36 | 36 |   | 
                                                                                                            
                                                            | 37 |  | -        collect($this->jigsaw->getOutputPaths())->each(function ($path) use ($baseUrl, $sitemap) { | 
                                                                                                            
                                                            |  | 37 | +        collect($this->jigsaw->getOutputPaths())->each(function($path) use ($baseUrl, $sitemap) { | 
                                                                                                            
                                                            | 38 | 38 |              // Don't index assets | 
                                                                                                            
                                                            | 39 | 39 |              if (!$this->isAsset($path) && !$this->isExcluded($path)) { | 
                                                                                                            
                                                            | 40 | 40 |                  // Check if a file extension is present | 
                                                                                                            
                                                            | 41 | 41 |                  if ($ext = pathinfo($path, PATHINFO_EXTENSION)) { | 
                                                                                                            
                                                            | 42 |  | -                    $sitemap->addItem(rtrim($baseUrl, '/').$path, time(), Sitemap::MONTHLY); | 
                                                                                                            
                                                            |  | 42 | +                    $sitemap->addItem(rtrim($baseUrl, '/') . $path, time(), Sitemap::MONTHLY); | 
                                                                                                            
                                                            | 43 | 43 |                  } else { | 
                                                                                                            
                                                            | 44 |  | -                    $sitemap->addItem(rtrim($baseUrl, '/').$path.($this->jigsaw->getConfig('sitemap.url_trailing_slash') ? '/' : ''), time(), Sitemap::MONTHLY); | 
                                                                                                            
                                                            |  | 44 | +                    $sitemap->addItem(rtrim($baseUrl, '/') . $path . ($this->jigsaw->getConfig('sitemap.url_trailing_slash') ? '/' : ''), time(), Sitemap::MONTHLY); | 
                                                                                                            
                                                            | 45 | 45 |                  } | 
                                                                                                            
                                                            | 46 | 46 |              } | 
                                                                                                            
                                                            | 47 | 47 |          }); | 
                                                                                                                                                        
                                                        |  | @@ -51,17 +51,17 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 51 | 51 |   | 
                                                                                                            
                                                            | 52 | 52 |      private function generateImageSitemap($baseUrl) | 
                                                                                                            
                                                            | 53 | 53 |      { | 
                                                                                                            
                                                            | 54 |  | -        $sitemap = new Sitemap($this->jigsaw->getDestinationPath().'/'.($this->jigsaw->getConfig('sitemap.image_sitemap.filename') ?: 'sitemap_images.xml')); | 
                                                                                                            
                                                            |  | 54 | +        $sitemap = new Sitemap($this->jigsaw->getDestinationPath() . '/' . ($this->jigsaw->getConfig('sitemap.image_sitemap.filename') ?: 'sitemap_images.xml')); | 
                                                                                                            
                                                            | 55 | 55 |          $exts = $this->jigsaw->getConfig('sitemap.image_sitemap.extensions'); | 
                                                                                                            
                                                            | 56 |  | -        $supported_extensions = $exts ? $exts->toArray() : []; | 
                                                                                                            
                                                            |  | 56 | +        $supported_extensions = $exts ? $exts->toArray() : [ ]; | 
                                                                                                            
                                                            | 57 | 57 |   | 
                                                                                                            
                                                            | 58 |  | -        collect($this->jigsaw->getOutputPaths())->each(function ($path) use ($baseUrl, $sitemap, $supported_extensions) { | 
                                                                                                            
                                                            |  | 58 | +        collect($this->jigsaw->getOutputPaths())->each(function($path) use ($baseUrl, $sitemap, $supported_extensions) { | 
                                                                                                            
                                                            | 59 | 59 |              // Don't index assets | 
                                                                                                            
                                                            | 60 | 60 |              if ($this->isAsset($path) && !$this->isExcluded($path)) { | 
                                                                                                            
                                                            | 61 | 61 |                  // Check if a file extension is present | 
                                                                                                            
                                                            | 62 | 62 |                  $ext = strtolower(pathinfo($path, PATHINFO_EXTENSION)); | 
                                                                                                            
                                                            | 63 | 63 |                  if (in_array($ext, $supported_extensions)) { | 
                                                                                                            
                                                            | 64 |  | -                    $sitemap->addItem(rtrim($baseUrl, '/').$path, time(), Sitemap::MONTHLY); | 
                                                                                                            
                                                            |  | 64 | +                    $sitemap->addItem(rtrim($baseUrl, '/') . $path, time(), Sitemap::MONTHLY); | 
                                                                                                            
                                                            | 65 | 65 |                  } | 
                                                                                                            
                                                            | 66 | 66 |              } | 
                                                                                                            
                                                            | 67 | 67 |          }); | 
                                                                                                                                                        
                                                        |  | @@ -72,7 +72,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 72 | 72 |      private function isExcluded($path) | 
                                                                                                            
                                                            | 73 | 73 |      { | 
                                                                                                            
                                                            | 74 | 74 |          $excluded = $this->jigsaw->getConfig('sitemap.exclude'); | 
                                                                                                            
                                                            | 75 |  | -        $invalidAssets = $excluded ? $excluded->toArray() : []; | 
                                                                                                            
                                                            |  | 75 | +        $invalidAssets = $excluded ? $excluded->toArray() : [ ]; | 
                                                                                                            
                                                            | 76 | 76 |   | 
                                                                                                            
                                                            | 77 | 77 |          return Str::contains($path, $invalidAssets); | 
                                                                                                            
                                                            | 78 | 78 |      } |