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,12 +12,15 @@
class Create
{
/**
* @return array<int, mixed>
*/
public static function form(): array
{
return [
Select::make('provider')
->options(
collect(config('core.notification_channels_providers'))
collect((array) config('core.notification_channels_providers'))
->mapWithKeys(fn ($provider) => [$provider => $provider])
)
->live()
@ -47,12 +50,16 @@ public static function form(): array
}
/**
* @param array<string, mixed> $data
*
* @throws Exception
*/
public static function action(array $data): void
{
try {
app(AddChannel::class)->add(auth()->user(), $data);
/** @var \App\Models\User $user */
$user = auth()->user();
app(AddChannel::class)->add($user, $data);
} catch (Exception $e) {
Notification::make()
->title($e->getMessage())