Skip to content

Commit 5e4f739

Browse files
committed
phpstan issues
1 parent 0d8b080 commit 5e4f739

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

subdomains/src/Filament/Components/Actions/SetSrvTargetAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ protected function setUp(): void
2626
return [
2727
TextInput::make('srv_target')
2828
->label(fn () => trans('subdomains::strings.srv_target'))
29-
->default(fn () => $node->srv_target) // @phpstan-ignore property.undefined
29+
->default(fn () => $node->srv_target) // @phpstan-ignore property.notFound
3030
->placeholder('play.example.com OR IPv4/IPv6 address')
3131
->helperText(trans('subdomains::strings.srv_target_confirmation'))
3232
->rules(['nullable', 'string', 'regex:/^(?=.{1,253}$)(?!-)[A-Za-z0-9-]{1,63}(?<!-)(?:\.(?!-)[A-Za-z0-9-]{1,63}(?<!-))*$/']),

subdomains/src/Filament/Server/Resources/Subdomains/SubdomainResource.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static function canAccess(): bool
3636
{
3737
/** @var Server $server */
3838
$server = Filament::getTenant();
39-
$ip = $server->allocation?->ip ?? null;
39+
$ip = $server->allocation->ip ?? null;
4040

4141
return parent::canAccess()
4242
&& $ip !== null
@@ -85,9 +85,9 @@ public static function table(Table $table): Table
8585
->state(fn (Subdomain $subdomain) => $subdomain->getLabel()),
8686
TextColumn::make('record_type')
8787
->label(trans('subdomains::strings.record_type'))
88-
->icon(fn (Subdomain $subdomain) => $subdomain->srv_record && empty($subdomain->server->node->srv_target) ? 'tabler-alert-triangle' : null) // @phpstan-ignore property.undefined
89-
->color(fn (Subdomain $subdomain) => $subdomain->srv_record && empty($subdomain->server->node->srv_target) ? 'danger' : null) // @phpstan-ignore property.undefined
90-
->tooltip(fn (Subdomain $subdomain) => $subdomain->srv_record && empty($subdomain->server->node->srv_target) ? trans('subdomains::strings.srv_target_missing') : null), // @phpstan-ignore property.undefined
88+
->icon(fn (Subdomain $subdomain) => $subdomain->srv_record && empty($subdomain->server->node->srv_target) ? 'tabler-alert-triangle' : null)
89+
->color(fn (Subdomain $subdomain) => $subdomain->srv_record && empty($subdomain->server->node->srv_target) ? 'danger' : null)
90+
->tooltip(fn (Subdomain $subdomain) => $subdomain->srv_record && empty($subdomain->server->node->srv_target) ? trans('subdomains::strings.srv_target_missing') : null),
9191
])
9292
->recordActions([
9393
EditAction::make()
@@ -130,7 +130,7 @@ public static function form(Schema $schema): Schema
130130
->label(trans('subdomains::strings.srv_record'))
131131
->helperText(fn () => Filament::getTenant()->node->srv_target ? trans('subdomains::strings.srv_record_help') : trans('subdomains::strings.srv_target_missing')) // @phpstan-ignore property.undefined
132132
->reactive()
133-
->disabled(fn () => empty(Filament::getTenant()->node->srv_target)), // @phpstan-ignore property.undefined
133+
->disabled(fn () => empty(Filament::getTenant()->node->srv_target)),
134134
]);
135135
}
136136

subdomains/src/Models/Subdomain.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ protected function upsertOnCloudflare(): bool
172172
return false;
173173
}
174174

175-
// @phpstan-ignore property.undefined
176175
if (empty($this->server->node->srv_target)) {
177176
Log::warning('Node missing SRV target for SRV record', ['node_id' => $this->server->node->id]);
178177
Notification::make()

0 commit comments

Comments
 (0)