mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-04 07:22:34 +00:00
Add phpstan level 7(#544)
This commit is contained in:
@ -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())
|
||||
|
Reference in New Issue
Block a user