mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 14:06:15 +00:00
code style fix
add command tests
This commit is contained in:
@ -15,7 +15,7 @@ public function connect(array $input): void
|
||||
$sourceControl = new SourceControl([
|
||||
'provider' => $input['provider'],
|
||||
'profile' => $input['name'],
|
||||
'access_token' => $input['token']
|
||||
'access_token' => $input['token'],
|
||||
]);
|
||||
|
||||
if (! $sourceControl->provider()->connect()) {
|
||||
@ -24,7 +24,7 @@ public function connect(array $input): void
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
$sourceControl->save();
|
||||
}
|
||||
|
||||
@ -36,14 +36,14 @@ private function validate(array $input): void
|
||||
$rules = [
|
||||
'provider' => [
|
||||
'required',
|
||||
Rule::in(\App\Enums\SourceControl::getValues())
|
||||
Rule::in(\App\Enums\SourceControl::getValues()),
|
||||
],
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
'token' => [
|
||||
'required'
|
||||
]
|
||||
'required',
|
||||
],
|
||||
];
|
||||
Validator::make($input, $rules)->validate();
|
||||
}
|
||||
|
Reference in New Issue
Block a user