Skip to content

Commit 87ee4d8

Browse files
committed
Fix option checks in default seeder command
Fix phpstan errors
1 parent ef19e20 commit 87ee4d8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Commands/SeedDefaultsCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ public function handle(): void
3434
{
3535
$this->info('Seeding default home page and settings...');
3636

37-
$noOptions = ! $this->hasOption('only-home-page') && ! $this->hasOption('only-settings') && ! $this->hasOption('only-tag-types');
37+
$noOptions = ! $this->option('only-home-page') && ! $this->option('only-settings') && ! $this->option('only-tag-types');
3838

39-
if ($noOptions || $this->hasOption('only-home-page')) {
39+
if ($noOptions || $this->option('only-home-page')) {
4040
$this->seedHomePage();
4141
}
42-
if ($noOptions || $this->hasOption('only-settings')) {
42+
if ($noOptions || $this->option('only-settings')) {
4343
$this->seedSettings();
4444
}
45-
if ($noOptions || $this->hasOption('only-tag-types')) {
45+
if ($noOptions || $this->option('only-tag-types')) {
4646
$this->seedTagTypes();
4747
}
4848

src/Services/SitemapGeneratorService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ protected function addSeoTagPages(): void
209209
protected function getLinkableModels(): array
210210
{
211211
$ctaModels = collect(FilamentFlexibleBlocksConfig::getCallToActionModels(CallToActionBlock::class))
212-
->map(function (array|string $model) {
213-
return is_array($model) ? $model['model'] : $model;
212+
->map(function (array|string $model): string {
213+
return \is_array($model) ? $model['model'] : $model;
214214
})
215215
->toArray();
216216
$menuModels = FilamentFlexibleContentBlockPages::config()->getMenuLinkableModels();

0 commit comments

Comments
 (0)