mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 14:06:15 +00:00
Add phpstan level 7(#544)
This commit is contained in:
@ -11,12 +11,17 @@
|
||||
|
||||
class UpdateSourceControl
|
||||
{
|
||||
/**
|
||||
* @param array<string, mixed> $input
|
||||
*
|
||||
* @throws ValidationException
|
||||
*/
|
||||
public function update(Site $site, array $input): void
|
||||
{
|
||||
$site->source_control_id = $input['source_control'];
|
||||
try {
|
||||
if ($site->sourceControl) {
|
||||
$site->sourceControl?->getRepo($site->repository);
|
||||
$site->sourceControl->getRepo($site->repository);
|
||||
}
|
||||
} catch (SourceControlIsNotConnected) {
|
||||
throw ValidationException::withMessages([
|
||||
@ -34,6 +39,9 @@ public function update(Site $site, array $input): void
|
||||
$site->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, array<int, mixed>>
|
||||
*/
|
||||
public static function rules(): array
|
||||
{
|
||||
return [
|
||||
|
Reference in New Issue
Block a user