From dcec498c04b4e01c5b23025f80a603dba5979c6f Mon Sep 17 00:00:00 2001 From: marco76tv Date: Mon, 27 May 2024 07:51:18 +0000 Subject: [PATCH] Dusting --- Filament/Blocks/Image.php | 2 +- Filament/Blocks/Slider.php | 2 +- Filament/Blocks/Title.php | 2 +- Filament/Forms/Components/AddressField.php | 4 ++-- .../filament/widgets/stat-with-icon.blade.php | 16 ++++++++-------- View/Components/Render/Block.php | 6 +++--- View/Composers/ThemeComposer.php | 3 +-- 7 files changed, 17 insertions(+), 18 deletions(-) diff --git a/Filament/Blocks/Image.php b/Filament/Blocks/Image.php index aab08505..94e32dd4 100755 --- a/Filament/Blocks/Image.php +++ b/Filament/Blocks/Image.php @@ -35,7 +35,7 @@ public static function make( ->columnSpanFull(), ] ) - ->columns('form' === $context ? 2 : 1); + ->columns($context === 'form' ? 2 : 1); } public static function getRatios(): array diff --git a/Filament/Blocks/Slider.php b/Filament/Blocks/Slider.php index 638223f0..84b1b122 100755 --- a/Filament/Blocks/Slider.php +++ b/Filament/Blocks/Slider.php @@ -32,6 +32,6 @@ public static function make( // ->afterStateHydrated(static fn ($state, $set) => $state || $set('level', 'h2')), ] ) - ->columns('form' === $context ? 2 : 1); + ->columns($context === 'form' ? 2 : 1); } } diff --git a/Filament/Blocks/Title.php b/Filament/Blocks/Title.php index f37e1ba8..15d6726a 100755 --- a/Filament/Blocks/Title.php +++ b/Filament/Blocks/Title.php @@ -39,6 +39,6 @@ public static function make( ->options($views), ] ) - ->columns('form' === $context ? 2 : 1); + ->columns($context === 'form' ? 2 : 1); } } diff --git a/Filament/Forms/Components/AddressField.php b/Filament/Forms/Components/AddressField.php index 507b8211..f9fa13bd 100755 --- a/Filament/Forms/Components/AddressField.php +++ b/Filament/Forms/Components/AddressField.php @@ -29,7 +29,7 @@ public function saveRelationships(): void $record = $this->getRecord(); $relationship = $record?->{$this->getRelationship()}(); - if (null === $relationship) { + if ($relationship === null) { return; } elseif ($address = $relationship->first()) { $address->update($state); @@ -80,7 +80,7 @@ protected function setUp(): void 'zip' => null, ]; $address = $record?->getRelationValue($this->getRelationship()); - if (null != $address && is_object($address) && method_exists($address, 'toArray')) { + if ($address != null && is_object($address) && method_exists($address, 'toArray')) { $data = $address->toArray(); } diff --git a/Resources/views/filament/widgets/stat-with-icon.blade.php b/Resources/views/filament/widgets/stat-with-icon.blade.php index 849a5118..4770728c 100644 --- a/Resources/views/filament/widgets/stat-with-icon.blade.php +++ b/Resources/views/filament/widgets/stat-with-icon.blade.php @@ -9,7 +9,7 @@ class="w-auto h-12" /> - + BBB @@ -18,7 +18,7 @@ class="w-auto h-12" {{-- - + - - + + AAA - + BBB - + - + - + --}} diff --git a/View/Components/Render/Block.php b/View/Components/Render/Block.php index 062664bc..8fd9bb6e 100755 --- a/View/Components/Render/Block.php +++ b/View/Components/Render/Block.php @@ -33,14 +33,14 @@ public function render(): ViewFactory|View return view('ui::empty'); } - if ('v1' === $this->tpl) { + if ($this->tpl === 'v1') { $this->tpl = $this->block['type']; } else { $this->tpl = $this->block['type'].'.'.$this->tpl; } $views = ['ui::components.blocks.'.$this->tpl]; - if (null !== $this->model) { + if ($this->model !== null) { $module = app(GetModuleNameFromModelAction::class)->execute($this->model); $views[] = strtolower($module).'::components.blocks.'.$this->tpl; } @@ -53,7 +53,7 @@ public function render(): ViewFactory|View * @phpstan-var view-string|null */ $view = Arr::first($views, $callback); - if (null === $view) { + if ($view === null) { throw new \Exception('none of these views exists ['.implode(', '.\chr(13), $views).']'); } $view_params = $this->block['data'] ?? []; diff --git a/View/Composers/ThemeComposer.php b/View/Composers/ThemeComposer.php index 67779871..bdf97619 100755 --- a/View/Composers/ThemeComposer.php +++ b/View/Composers/ThemeComposer.php @@ -17,8 +17,7 @@ public function metatags(): \Illuminate\View\View } /** - * @param string $index - * + * @param string $index * @return \Illuminate\Config\Repository|\Illuminate\Contracts\Foundation\Application|mixed */ public function metatag($index)