From dae32bf1b33727c403f07f39a415b4bf216a4b58 Mon Sep 17 00:00:00 2001 From: Darren Odden Date: Wed, 7 Oct 2026 20:31:35 -0700 Subject: [PATCH] MailEditor::theme(): type the closure loosely A Filament closure may take injected parameters such as $get, so the docblock no longer claims it takes none. Static analysis in a project that passes fn (Get $get) rejected the narrower type. Co-Authored-By: Claude Sonnet 5.5 --- src/Filament/Components/MailEditor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Filament/Components/MailEditor.php b/src/Filament/Components/MailEditor.php index e57e00d..e937689 100644 --- a/src/Filament/Components/MailEditor.php +++ b/src/Filament/Components/MailEditor.php @@ -23,7 +23,7 @@ class MailEditor extends Field { protected string $view = 'mail-builder::filament.mail-editor'; - /** @var array|Closure(): (array|null) */ + /** @var array|Closure */ protected array|Closure $theme = []; /** @@ -32,7 +32,7 @@ class MailEditor extends Field * * ->theme(fn (Get $get): array => $get('theme') ?? []) * - * @param array|Closure(): (array|null) $theme + * @param array|Closure $theme A closure may take any of Filament's injected parameters (`$get`, `$record`, ...) and returns the theme array (or null for none). */ public function theme(array|Closure $theme): static {