Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
giuseppeaege authored and github-actions[bot] committed Feb 5, 2024
1 parent 5925557 commit 477cedf
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Filament/Blocks/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static function make(
->columnSpanFull(),
]
)
->columns($context === 'form' ? 2 : 1);
->columns('form' === $context ? 2 : 1);
}

public static function getRatios(): array
Expand Down
2 changes: 1 addition & 1 deletion Filament/Blocks/Title.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion Tests/Unit/Database/Seeders/UIDatabaseSeederTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/Filament/Blocks/ImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/Filament/Blocks/ParagraphTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/Filament/Blocks/TitleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/Filament/Forms/Components/ParentSelectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/Filament/Tables/Columns/GroupColumnTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/Providers/Filament/AdminPanelProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/Providers/UIServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/Services/UIServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/View/Components/NavbarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ protected function setUp(): void
{
parent::setUp();

$this->navbar = new Navbar;
$this->navbar = new Navbar();
}

protected function tearDown(): void
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/View/Composers/ThemeComposerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/docs/listeners/GenerateSitemapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions View/Components/Render/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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'] ?? [];
Expand Down

0 comments on commit 477cedf

Please sign in to comment.