| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function handle(): void |
||
| 23 | { |
||
| 24 | if (! Hyde::hasSiteUrl()) { |
||
|
|
|||
| 25 | $this->skip('Cannot generate sitemap without a valid base URL'); |
||
| 26 | } |
||
| 27 | |||
| 28 | $this->path = Hyde::sitePath('sitemap.xml'); |
||
| 29 | |||
| 30 | $this->needsParentDirectory($this->path); |
||
| 31 | |||
| 32 | file_put_contents($this->path, SitemapGenerator::make()); |
||
| 33 | } |
||
| 40 |