formatting

This commit is contained in:
rennokki 2020-08-13 08:32:20 +03:00 committed by GitHub
parent a752fb9ecc
commit 99c6c06897
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 14 deletions

View File

@ -65,19 +65,6 @@ class HttpStatisticsLogger implements StatisticsLogger
return $this->statistics[$appId];
}
protected function getUrl(): string
{
$action = [WebSocketStatisticsEntriesController::class, 'store'];
$overridenUrl = config('websockets.statistics.base_url_override');
if ($overridenUrl) {
return $overridenUrl.action($action, [], false);
}
return action($action);
}
public function save()
{
foreach ($this->statistics as $appId => $statistic) {
@ -92,7 +79,7 @@ class HttpStatisticsLogger implements StatisticsLogger
$this
->browser
->post(
$this->getUrl(),
$this->storeStatisticsUrl(),
['Content-Type' => 'application/json'],
stream_for(json_encode($postData))
);
@ -101,4 +88,17 @@ class HttpStatisticsLogger implements StatisticsLogger
$statistic->reset($currentConnectionCount);
}
}
protected function storeStatisticsUrl(): string
{
$action = [WebSocketStatisticsEntriesController::class, 'store'];
$overridenUrl = config('websockets.statistics.base_url_override');
if ($overridenUrl) {
return $overridenUrl.action($action, [], false);
}
return action($action);
}
}