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 Oct 4, 2024
1 parent 8e0baa6 commit bb66ca4
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Actions/Icon/GetAllIconsAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function execute(string $context = 'form')
foreach ($set['paths'] as $path) {
foreach (File::allFiles($path) as $file) {
// Simply ignore files that aren't SVGs
if ($file->getExtension() !== 'svg') {
if ('svg' !== $file->getExtension()) {
continue;
}

Expand Down
3 changes: 2 additions & 1 deletion Datas/SliderDataCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ class SliderDataCollection extends Data
public DataCollection $slider_data;

public function __construct(
) {}
) {
}
}
9 changes: 4 additions & 5 deletions Enums/TableLayoutEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Modules\UI\Enums;

use Exception;
use Filament\Resources\Pages\ListRecords;
use Filament\Support\Contracts\HasColor;
use Filament\Support\Contracts\HasIcon;
Expand Down Expand Up @@ -56,14 +55,14 @@ public function getIcon(): string
public function toggle(): self
{
// $res = self::LIST === $this ? self::GRID : self::LIST;
$res = $this === self::GRID ? self::LIST : self::GRID;
$res = self::GRID === $this ? self::LIST : self::GRID;

return $res;
}

public function isGridLayout(): bool
{
return $this === self::GRID;
return self::GRID === $this;
}

public function getTableContentGrid(): ?array
Expand All @@ -86,10 +85,10 @@ public function getTableColumns(): array
$caller = Arr::get($trace, '1.object');

if (! method_exists($caller, 'getGridTableColumns')) {
throw new Exception('method getGridTableColumns not found in ['.get_class($caller).']');
throw new \Exception('method getGridTableColumns not found in ['.get_class($caller).']');
}
if (! method_exists($caller, 'getListTableColumns')) {
throw new Exception('method getListTableColumns not found in ['.get_class($caller).']');
throw new \Exception('method getListTableColumns not found in ['.get_class($caller).']');
}

$columns = $this->isGridLayout()
Expand Down
4 changes: 2 additions & 2 deletions Filament/Actions/Header/TableLayoutToggleHeaderAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ protected function setUp(): void
// ->tooltip(trans('setting::database_connection.actions.database-backup.tooltip'))
// ->icon(trans('setting::database_connection.actions.database-backup.icon'))
// ->icon($this->list_icon)
->icon(fn ($livewire) => $livewire->layoutView === 'list' ? $this->list_icon : $this->grid_icon)
->icon(fn ($livewire) => 'list' === $livewire->layoutView ? $this->list_icon : $this->grid_icon)
->action(
function ($livewire) {
$livewire->layoutView = ($livewire->layoutView === 'grid' ? 'list' : 'grid');
$livewire->layoutView = ('grid' === $livewire->layoutView ? 'list' : 'grid');
}
);
}
Expand Down
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/ImageSpatie.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ function (HasForms $livewire, SpatieMediaLibraryFileUpload $component, Temporary
TextInput::make('caption')
->label('didascalia'),
])
->columns($context === 'form' ? 2 : 1);
->columns('form' === $context ? 2 : 1);
}
}
2 changes: 1 addition & 1 deletion Filament/Blocks/ImagesGallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,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/Slider.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,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 Filament/Blocks/Title.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ public static function make(
->options($views),
]
)
->columns($context === 'form' ? 2 : 1);
->columns('form' === $context ? 2 : 1);
}
}
2 changes: 1 addition & 1 deletion Filament/Blocks/VideoSpatie.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function (HasForms $livewire, SpatieMediaLibraryFileUpload $component, Temporary

// Forms\Components\SpatieMediaLibraryFileUpload::make('media_id')
])
->columns($context === 'form' ? 2 : 1);
->columns('form' === $context ? 2 : 1);
}

public static function getRatios(): array
Expand Down
4 changes: 2 additions & 2 deletions Filament/Forms/Components/AddressField.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ protected function setUp(): void
'zip' => null,
];
$address = $record?->getRelationValue($this->getRelationship());
if ($address !== null && is_object($address) && method_exists($address, 'toArray')) {
if (null !== $address && is_object($address) && method_exists($address, 'toArray')) {
$data = $address->toArray();
}

Expand All @@ -52,7 +52,7 @@ public function saveRelationships(): void
$record = $this->getRecord();
$relationship = $record?->{$this->getRelationship()}();

if ($relationship === null) {
if (null === $relationship) {
return;
}
if ($address = $relationship->first()) {
Expand Down
3 changes: 1 addition & 2 deletions Filament/Widgets/StatWithIconWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Modules\UI\Filament\Widgets;

use Closure;
use Filament\Widgets\Widget as BaseWidget;
use Illuminate\Contracts\Support\Htmlable;

Expand All @@ -15,7 +14,7 @@ class StatWithIconWidget extends BaseWidget
protected string|Htmlable $label;

/**
* @var scalar|Htmlable|Closure
* @var scalar|Htmlable|\Closure
*/
protected $value;

Expand Down
4 changes: 3 additions & 1 deletion Providers/EventServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@ class EventServiceProvider extends BaseEventServiceProvider
/**
* Configure the proper event listeners for email verification.
*/
protected function configureEmailVerification(): void {}
protected function configureEmailVerification(): void
{
}
}

0 comments on commit bb66ca4

Please sign in to comment.