Skip to content

Commit ec4cf63

Browse files
stengithub-actions[bot]
authored andcommitted
Fix styling
1 parent 417d480 commit ec4cf63

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Services/SitemapGeneratorService.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@
1515
use Statikbe\FilamentFlexibleContentBlockPages\Services\Enum\SitemapGeneratorMethod;
1616
use Statikbe\FilamentFlexibleContentBlocks\FilamentFlexibleBlocksConfig;
1717
use Statikbe\FilamentFlexibleContentBlocks\Models\Contracts\HasCode;
18-
use Statikbe\FilamentFlexibleContentBlocks\Models\Contracts\HasPageAttributes;
1918
use Statikbe\FilamentFlexibleContentBlocks\Models\Contracts\HasParent;
2019
use Statikbe\FilamentFlexibleContentBlocks\Models\Contracts\Linkable;
2120

2221
class SitemapGeneratorService
2322
{
2423
protected Sitemap $sitemap;
24+
2525
protected string $canonicalLocale;
26+
2627
protected array $supportedLocales;
2728

2829
public function __construct()
@@ -35,15 +36,14 @@ public function __construct()
3536

3637
public function generate(): void
3738
{
38-
if (!FilamentFlexibleContentBlockPages::config()->isSitemapEnabled()) {
39+
if (! FilamentFlexibleContentBlockPages::config()->isSitemapEnabled()) {
3940
return;
4041
}
4142

4243
$method = FilamentFlexibleContentBlockPages::config()->getSitemapMethod();
4344
if ($method === SitemapGeneratorMethod::CRAWL) {
4445
$this->generateByCrawling();
45-
}
46-
else if($method === SitemapGeneratorMethod::HYBRID) {
46+
} elseif ($method === SitemapGeneratorMethod::HYBRID) {
4747
$this->generateByCrawling();
4848
$this->generateManually();
4949
} else {
@@ -143,7 +143,7 @@ protected function addLinkableModels(): void
143143

144144
$modelQuery = $modelClass::query();
145145

146-
if(method_exists($modelClass, 'scopePublished')) {
146+
if (method_exists($modelClass, 'scopePublished')) {
147147
$modelQuery->published();
148148
}
149149

@@ -233,17 +233,17 @@ protected function shouldExcludeUrl(string $url, array $excludePatterns): bool
233233
return false;
234234
}
235235

236-
protected function addToSitemap(string $url, ?Carbon $lastModifiedAt, float $priority, string $frequency, bool $onlyCreate=false): Url
236+
protected function addToSitemap(string $url, ?Carbon $lastModifiedAt, float $priority, string $frequency, bool $onlyCreate = false): Url
237237
{
238238
$urlTag = Url::create($url)
239239
->setPriority($priority)
240240
->setChangeFrequency($frequency);
241241

242-
if($lastModifiedAt) {
242+
if ($lastModifiedAt) {
243243
$urlTag->setLastModificationDate($lastModifiedAt);
244244
}
245245

246-
if (!$onlyCreate) {
246+
if (! $onlyCreate) {
247247
$this->sitemap->add($urlTag);
248248
}
249249

0 commit comments

Comments
 (0)