refactor: build HTTP client in single call, not conditional mutation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
b6823538d5
commit
9d49fc601b
1 changed files with 3 additions and 7 deletions
|
|
@ -28,13 +28,9 @@ class BrainService
|
|||
*/
|
||||
private function http(int $timeout = 10): \Illuminate\Http\Client\PendingRequest
|
||||
{
|
||||
$request = Http::timeout($timeout);
|
||||
|
||||
if (! $this->verifySsl) {
|
||||
$request = $request->withoutVerifying();
|
||||
}
|
||||
|
||||
return $request;
|
||||
return $this->verifySsl
|
||||
? Http::timeout($timeout)
|
||||
: Http::withoutVerifying()->timeout($timeout);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Reference in a new issue