DEleted function in request and changed the way the controller uses it,
linter / quality (pull_request) Successful in 1m13s
tests / ci (8.4) (pull_request) Failing after 1m15s

This commit is contained in:
Eric Peters
2026-04-03 16:50:00 +02:00
parent 2c1a0cbff3
commit 1c355c20b4
27 changed files with 285 additions and 263 deletions
@@ -19,6 +19,13 @@ class UpdateUserGitConnectionRequest extends FormRequest
return $this->user() !== null;
}
protected function prepareForValidation(): void
{
$this->merge([
'base_url' => $this->normalizedBaseUrl(),
'provider' => Str::lower(trim((string) $this->input('provider'))),
]);
}
/**
* Get the validation rules that apply to the request.
*
@@ -47,30 +54,6 @@ class UpdateUserGitConnectionRequest extends FormRequest
))],
];
}
protected function prepareForValidation(): void
{
$this->merge([
'base_url' => $this->normalizedBaseUrl(),
'provider' => Str::lower(trim((string) $this->input('provider'))),
]);
}
public function apiToken(): string
{
return (string) $this->validated('api_token');
}
public function baseUrl(): string
{
return (string) $this->validated('base_url');
}
public function provider(): GitProviderKey
{
return GitProviderKey::from((string) $this->validated('provider'));
}
private function normalizedBaseUrl(): string
{
$baseUrl = Str::of((string) $this->input('base_url'))