mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-04 15:32:35 +00:00
Add phpstan level 7(#544)
This commit is contained in:
@ -10,6 +10,8 @@
|
||||
class CreateSshKey
|
||||
{
|
||||
/**
|
||||
* @param array<string, mixed> $input
|
||||
*
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function create(User $user, array $input): SshKey
|
||||
@ -25,7 +27,7 @@ public function create(User $user, array $input): SshKey
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ValidationException
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public static function rules(): array
|
||||
{
|
||||
|
@ -3,11 +3,15 @@
|
||||
namespace App\Actions\SshKey;
|
||||
|
||||
use App\Enums\SshKeyStatus;
|
||||
use App\Exceptions\SSHError;
|
||||
use App\Models\Server;
|
||||
use App\Models\SshKey;
|
||||
|
||||
class DeleteKeyFromServer
|
||||
{
|
||||
/**
|
||||
* @throws SSHError
|
||||
*/
|
||||
public function delete(Server $server, SshKey $sshKey): void
|
||||
{
|
||||
$sshKey->servers()->updateExistingPivot($server->id, [
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace App\Actions\SshKey;
|
||||
|
||||
use App\Enums\SshKeyStatus;
|
||||
use App\Exceptions\SSHError;
|
||||
use App\Models\Server;
|
||||
use App\Models\SshKey;
|
||||
use App\Models\User;
|
||||
@ -10,6 +11,11 @@
|
||||
|
||||
class DeployKeyToServer
|
||||
{
|
||||
/**
|
||||
* @param array<string, mixed> $input
|
||||
*
|
||||
* @throws SSHError
|
||||
*/
|
||||
public function deploy(Server $server, array $input): void
|
||||
{
|
||||
/** @var SshKey $sshKey */
|
||||
@ -23,6 +29,9 @@ public function deploy(Server $server, array $input): void
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, array<string>>
|
||||
*/
|
||||
public static function rules(User $user, Server $server): array
|
||||
{
|
||||
return [
|
||||
|
Reference in New Issue
Block a user