Add phpstan level 7(#544)

This commit is contained in:
Saeed Vaziry
2025-03-12 13:31:10 +01:00
committed by GitHub
parent c22bb1fa80
commit 493cbb0849
437 changed files with 4505 additions and 2193 deletions

View File

@ -12,8 +12,14 @@
class ProjectsList extends Widget
{
/**
* @var array<string>
*/
protected $listeners = ['$refresh'];
/**
* @return Builder<Project>
*/
protected function getTableQuery(): Builder
{
return Project::query();
@ -35,17 +41,20 @@ protected function getTableColumns(): array
public function table(Table $table): Table
{
/** @var \App\Models\User $user */
$user = auth()->user();
return $table
->heading(null)
->query($this->getTableQuery())
->columns($this->getTableColumns())
->recordUrl(fn (Project $record) => Settings::getUrl(['project' => $record]))
->recordUrl(fn (Project $record): string => Settings::getUrl(['project' => $record]))
->actions([
Action::make('settings')
->label('Settings')
->icon('heroicon-o-cog-6-tooth')
->authorize(fn ($record) => auth()->user()->can('update', $record))
->url(fn (Project $record) => Settings::getUrl(['project' => $record])),
->authorize(fn ($record) => $user->can('update', $record))
->url(fn (Project $record): string => Settings::getUrl(['project' => $record])),
]);
}
}