Skip to content

Commit e1e7cdb

Browse files
committed
WIP
Signed-off-by: Nguyen Van Nguyen <[email protected]>
1 parent dc47994 commit e1e7cdb

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/Command/SyncKeyCommand.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,14 @@ private function synchronize(): void
199199

200200
private function sendRequest(): ResponseInterface
201201
{
202-
$httpClient = Discover::httpClient();
203-
$requestFactory = Discover::httpRequestFactory();
204-
$httpRequest = $requestFactory
205-
->createRequest(self::REQUEST_METHOD, $this->wksUrl)
206-
->withHeader('Content-Type', self::CONTENT_TYPE)
207-
->withHeader(
208-
'User-Agent',
209-
$_SERVER['HTTP_USER_AGENT'] ?? self::HTTP_USER_AGENT
210-
);
211-
return $httpClient->sendRequest($httpRequest);
202+
return Discover::httpClient()->sendRequest(
203+
Discover::httpRequestFactory()
204+
->createRequest(self::REQUEST_METHOD, $this->wksUrl)
205+
->withHeader('Content-Type', self::CONTENT_TYPE)
206+
->withHeader(
207+
'User-Agent',
208+
$_SERVER['HTTP_USER_AGENT'] ?? self::HTTP_USER_AGENT
209+
)
210+
);
212211
}
213212
}

0 commit comments

Comments
 (0)