diff --git a/Filament/Blocks/Image.php b/Filament/Blocks/Image.php index 94e32dd4..aab08505 100644 --- a/Filament/Blocks/Image.php +++ b/Filament/Blocks/Image.php @@ -35,7 +35,7 @@ public static function make( ->columnSpanFull(), ] ) - ->columns($context === 'form' ? 2 : 1); + ->columns('form' === $context ? 2 : 1); } public static function getRatios(): array diff --git a/Filament/Blocks/Title.php b/Filament/Blocks/Title.php index 238581a3..66826c99 100644 --- a/Filament/Blocks/Title.php +++ b/Filament/Blocks/Title.php @@ -31,6 +31,6 @@ public static function make( ->afterStateHydrated(static fn ($state, $set) => $state || $set('level', 'h2')), ] ) - ->columns($context === 'form' ? 2 : 1); + ->columns('form' === $context ? 2 : 1); } } diff --git a/Tests/Unit/Database/Seeders/UIDatabaseSeederTest.php b/Tests/Unit/Database/Seeders/UIDatabaseSeederTest.php index b536eb57..3c3b4f47 100644 --- a/Tests/Unit/Database/Seeders/UIDatabaseSeederTest.php +++ b/Tests/Unit/Database/Seeders/UIDatabaseSeederTest.php @@ -21,7 +21,7 @@ protected function setUp(): void parent::setUp(); /* @todo Correctly instantiate tested object to use it. */ - $this->uIDatabaseSeeder = new UIDatabaseSeeder; + $this->uIDatabaseSeeder = new UIDatabaseSeeder(); } protected function tearDown(): void diff --git a/Tests/Unit/Filament/Blocks/ImageTest.php b/Tests/Unit/Filament/Blocks/ImageTest.php index d08df9c8..6751c7de 100644 --- a/Tests/Unit/Filament/Blocks/ImageTest.php +++ b/Tests/Unit/Filament/Blocks/ImageTest.php @@ -21,7 +21,7 @@ protected function setUp(): void parent::setUp(); /* @todo Correctly instantiate tested object to use it. */ - $this->image = new Image; + $this->image = new Image(); } protected function tearDown(): void diff --git a/Tests/Unit/Filament/Blocks/ParagraphTest.php b/Tests/Unit/Filament/Blocks/ParagraphTest.php index b5f4f40c..2799705f 100644 --- a/Tests/Unit/Filament/Blocks/ParagraphTest.php +++ b/Tests/Unit/Filament/Blocks/ParagraphTest.php @@ -21,7 +21,7 @@ protected function setUp(): void parent::setUp(); /* @todo Correctly instantiate tested object to use it. */ - $this->paragraph = new Paragraph; + $this->paragraph = new Paragraph(); } protected function tearDown(): void diff --git a/Tests/Unit/Filament/Blocks/TitleTest.php b/Tests/Unit/Filament/Blocks/TitleTest.php index 3aae7bd2..e3ab2f69 100644 --- a/Tests/Unit/Filament/Blocks/TitleTest.php +++ b/Tests/Unit/Filament/Blocks/TitleTest.php @@ -21,7 +21,7 @@ protected function setUp(): void parent::setUp(); /* @todo Correctly instantiate tested object to use it. */ - $this->title = new Title; + $this->title = new Title(); } protected function tearDown(): void diff --git a/Tests/Unit/Filament/Forms/Components/ParentSelectTest.php b/Tests/Unit/Filament/Forms/Components/ParentSelectTest.php index d714a948..ef5bf374 100644 --- a/Tests/Unit/Filament/Forms/Components/ParentSelectTest.php +++ b/Tests/Unit/Filament/Forms/Components/ParentSelectTest.php @@ -21,7 +21,7 @@ protected function setUp(): void parent::setUp(); /* @todo Correctly instantiate tested object to use it. */ - $this->parentSelect = new ParentSelect; + $this->parentSelect = new ParentSelect(); } protected function tearDown(): void diff --git a/Tests/Unit/Filament/Tables/Columns/GroupColumnTest.php b/Tests/Unit/Filament/Tables/Columns/GroupColumnTest.php index b64e3055..f338cb47 100644 --- a/Tests/Unit/Filament/Tables/Columns/GroupColumnTest.php +++ b/Tests/Unit/Filament/Tables/Columns/GroupColumnTest.php @@ -21,7 +21,7 @@ protected function setUp(): void parent::setUp(); /* @todo Correctly instantiate tested object to use it. */ - $this->groupColumn = new GroupColumn; + $this->groupColumn = new GroupColumn(); } protected function tearDown(): void diff --git a/Tests/Unit/Providers/Filament/AdminPanelProviderTest.php b/Tests/Unit/Providers/Filament/AdminPanelProviderTest.php index c650ae6b..fbd677dd 100644 --- a/Tests/Unit/Providers/Filament/AdminPanelProviderTest.php +++ b/Tests/Unit/Providers/Filament/AdminPanelProviderTest.php @@ -21,7 +21,7 @@ protected function setUp(): void parent::setUp(); /* @todo Correctly instantiate tested object to use it. */ - $this->adminPanelProvider = new AdminPanelProvider; + $this->adminPanelProvider = new AdminPanelProvider(); } protected function tearDown(): void diff --git a/Tests/Unit/Providers/UIServiceProviderTest.php b/Tests/Unit/Providers/UIServiceProviderTest.php index ab74047b..daba8e94 100644 --- a/Tests/Unit/Providers/UIServiceProviderTest.php +++ b/Tests/Unit/Providers/UIServiceProviderTest.php @@ -21,7 +21,7 @@ protected function setUp(): void parent::setUp(); /* @todo Correctly instantiate tested object to use it. */ - $this->uIServiceProvider = new UIServiceProvider; + $this->uIServiceProvider = new UIServiceProvider(); } protected function tearDown(): void diff --git a/Tests/Unit/Services/UIServiceTest.php b/Tests/Unit/Services/UIServiceTest.php index 9cd48f03..2cf4796c 100644 --- a/Tests/Unit/Services/UIServiceTest.php +++ b/Tests/Unit/Services/UIServiceTest.php @@ -21,7 +21,7 @@ protected function setUp(): void parent::setUp(); /* @todo Correctly instantiate tested object to use it. */ - $this->uIService = new UIService; + $this->uIService = new UIService(); } protected function tearDown(): void diff --git a/Tests/Unit/View/Components/NavbarTest.php b/Tests/Unit/View/Components/NavbarTest.php index 990fad98..ecc16c40 100644 --- a/Tests/Unit/View/Components/NavbarTest.php +++ b/Tests/Unit/View/Components/NavbarTest.php @@ -20,7 +20,7 @@ protected function setUp(): void { parent::setUp(); - $this->navbar = new Navbar; + $this->navbar = new Navbar(); } protected function tearDown(): void diff --git a/Tests/Unit/View/Composers/ThemeComposerTest.php b/Tests/Unit/View/Composers/ThemeComposerTest.php index 09a4ec81..316ddc68 100644 --- a/Tests/Unit/View/Composers/ThemeComposerTest.php +++ b/Tests/Unit/View/Composers/ThemeComposerTest.php @@ -21,7 +21,7 @@ protected function setUp(): void parent::setUp(); /* @todo Correctly instantiate tested object to use it. */ - $this->themeComposer = new ThemeComposer; + $this->themeComposer = new ThemeComposer(); } protected function tearDown(): void diff --git a/Tests/Unit/docs/listeners/GenerateSitemapTest.php b/Tests/Unit/docs/listeners/GenerateSitemapTest.php index f19ecb74..a687f632 100644 --- a/Tests/Unit/docs/listeners/GenerateSitemapTest.php +++ b/Tests/Unit/docs/listeners/GenerateSitemapTest.php @@ -22,7 +22,7 @@ protected function setUp(): void parent::setUp(); /* @todo Correctly instantiate tested object to use it. */ - $this->generateSitemap = new GenerateSitemap; + $this->generateSitemap = new GenerateSitemap(); } protected function tearDown(): void diff --git a/View/Components/Render/Block.php b/View/Components/Render/Block.php index 2db96cb7..ec3053c5 100644 --- a/View/Components/Render/Block.php +++ b/View/Components/Render/Block.php @@ -28,7 +28,7 @@ public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vi $this->tpl = $this->block['type']; $views = ['ui::components.blocks.'.$this->tpl]; - if ($this->model !== null) { + if (null !== $this->model) { $module = app(GetModuleNameFromModelAction::class)->execute($this->model); $views[] = strtolower($module).'::components.blocks.'.$this->tpl; } @@ -37,7 +37,7 @@ public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vi * @phpstan-var view-string|null */ $view = Arr::first($views, static fn (string $view) => view()->exists($view)); - if ($view === null) { + if (null === $view) { throw new \Exception('none of these views exists ['.implode(', '.chr(13), $views).']'); } $view_params = $this->block['data'] ?? [];