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:
@ -4,6 +4,7 @@
|
||||
|
||||
use App\Actions\SourceControl\EditSourceControl;
|
||||
use App\Models\SourceControl;
|
||||
use App\Models\User;
|
||||
use Exception;
|
||||
use Filament\Forms\Components\Checkbox;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
@ -12,6 +13,9 @@
|
||||
|
||||
class Edit
|
||||
{
|
||||
/**
|
||||
* @return array<int, mixed>
|
||||
*/
|
||||
public static function form(SourceControl $sourceControl): array
|
||||
{
|
||||
return [
|
||||
@ -39,12 +43,17 @@ public static function form(SourceControl $sourceControl): array
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $data
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function action(SourceControl $sourceControl, array $data): void
|
||||
{
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
|
||||
try {
|
||||
app(EditSourceControl::class)->edit($sourceControl, auth()->user()->currentProject, $data);
|
||||
app(EditSourceControl::class)->edit($sourceControl, $user->currentProject, $data);
|
||||
} catch (Exception $e) {
|
||||
Notification::make()
|
||||
->title($e->getMessage())
|
||||
|
Reference in New Issue
Block a user