Skip to content

Commit 0c62696

Browse files
committed
fix: phpstan errors
1 parent 46de711 commit 0c62696

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/Components/Forms/Actions/CreatePageBuilderBlockAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ protected function setUp(): void
2626

2727
$this->successNotificationTitle(__('filament-panels::resources/pages/create-record.notifications.created.title'));
2828

29-
$this->form(function ($arguments, Schema $schema, PageBuilder $component) {
29+
$this->schema(function ($arguments, Schema $schema, PageBuilder $component) {
3030
$blockType = $arguments['block_type'];
3131

3232
$preview = PageBuilderPreview::make('preview')

src/Components/Forms/Actions/EditPageBuilderBlockAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ protected function setUp(): void
2626

2727
$this->successNotificationTitle(__('filament-panels::resources/pages/edit-record.notifications.saved.title'));
2828

29-
$this->form(function ($arguments, Schema $schema, PageBuilder $component) {
29+
$this->schema(function ($arguments, Schema $schema, PageBuilder $component) {
3030
$block = $component->getState()[$arguments['index']];
3131

3232
$preview = PageBuilderPreview::make('preview')

src/Components/Forms/PageBuilder.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ public function relationship(
335335
$this->modifyRelationshipQueryUsing = $modifyRelationshipQueryUsing;
336336

337337
$this->loadStateFromRelationshipsUsing(function (PageBuilder $component) {
338-
/** @var Collection */
339338
$record = $component->getRecord();
340339
$blocks = $this->getConstrainAppliedQuery($record)
341340
->get();

src/Components/Forms/PageBuilderPreview.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function getPageBuilderData(): array
6262
throw new Exception('Page builder field not set');
6363
}
6464

65-
$data = $this->getGetCallback()($this->pageBuilderField);
65+
$data = $this->makeGetUtility()($this->pageBuilderField);
6666

6767
if ($this->singleItemPreview) {
6868
$blockType = $data['block_type'] ?? null;

src/Resources/GlobalBlockConfigResource.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Filament\Forms\Components\Field;
99
use Filament\Forms\Components\Placeholder;
1010
use Filament\Forms\Components\TextInput;
11+
use Filament\Infolists\Components\TextEntry;
1112
use Filament\Resources\Resource;
1213
use Filament\Schemas\Components\Section;
1314
use Filament\Schemas\Schema;
@@ -73,9 +74,9 @@ public static function form(Schema $form): Schema
7374
return $schema;
7475
} catch (Exception $e) {
7576
return [
76-
Placeholder::make('error')
77+
TextEntry::make('error')
7778
->label('Error')
78-
->content('Unable to load block schema: ' . $e->getMessage()),
79+
->state('Unable to load block schema: ' . $e->getMessage()),
7980
];
8081
}
8182
})

0 commit comments

Comments
 (0)