Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
marco76tv authored and github-actions[bot] committed Jan 16, 2024
1 parent 0948747 commit e4e2ef5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
return [
'name' => 'UI',
'navigation_sort' => 1,
//'icon' => 'heroicon-o-cog', // icon on dashboard
// 'icon' => 'heroicon-o-cog', // icon on dashboard
'icon' => 'fas-theater-masks',
];
2 changes: 1 addition & 1 deletion Filament/Blocks/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static function make(
TextInput::make('caption')
->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 @@ -27,6 +27,6 @@ public static function make(
])
->afterStateHydrated(static fn ($state, $set) => $state || $set('level', 'h2')),
])
->columns($context === 'form' ? 2 : 1);
->columns('form' === $context ? 2 : 1);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function storeChildItem(Model $record, array $data): void
$last_son = $record::class::where('parent_id', $data['parent_id'])
->orderByDesc('id')
->first();
if ($last_son == null) {
if (null == $last_son) {
$data['id'] = $data['parent_id'].'-1';
} else {
$new_id = intval(Str::afterLast($last_son['id'], '-')) + 1;
Expand Down Expand Up @@ -202,7 +202,7 @@ protected function getHeaderActions(): array
}
})
->requiresConfirmation()
->visible($this->mountedItem != null),
->visible(null != $this->mountedItem),
Action::make('item')
->mountUsing(function (ComponentContainer $form): void {
if (! $this->mountedItem) {
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 @@ -29,13 +29,13 @@ public function render(): Renderable
$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;
}

$view = Arr::first($views, static fn (string $view) => view()->exists($view));
if ($view === null) {
if (null === $view) {
dddx([$views, $this->model]);
}
$view_params = $this->block['data'] ?? [];
Expand Down

0 comments on commit e4e2ef5

Please sign in to comment.