Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit 99c6c06

Browse files
authored
formatting
1 parent a752fb9 commit 99c6c06

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/Statistics/Logger/HttpStatisticsLogger.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,6 @@ protected function findOrMakeStatisticForAppId($appId): Statistic
6565
return $this->statistics[$appId];
6666
}
6767

68-
protected function getUrl(): string
69-
{
70-
$action = [WebSocketStatisticsEntriesController::class, 'store'];
71-
72-
$overridenUrl = config('websockets.statistics.base_url_override');
73-
74-
if ($overridenUrl) {
75-
return $overridenUrl.action($action, [], false);
76-
}
77-
78-
return action($action);
79-
}
80-
8168
public function save()
8269
{
8370
foreach ($this->statistics as $appId => $statistic) {
@@ -92,7 +79,7 @@ public function save()
9279
$this
9380
->browser
9481
->post(
95-
$this->getUrl(),
82+
$this->storeStatisticsUrl(),
9683
['Content-Type' => 'application/json'],
9784
stream_for(json_encode($postData))
9885
);
@@ -101,4 +88,17 @@ public function save()
10188
$statistic->reset($currentConnectionCount);
10289
}
10390
}
91+
92+
protected function storeStatisticsUrl(): string
93+
{
94+
$action = [WebSocketStatisticsEntriesController::class, 'store'];
95+
96+
$overridenUrl = config('websockets.statistics.base_url_override');
97+
98+
if ($overridenUrl) {
99+
return $overridenUrl.action($action, [], false);
100+
}
101+
102+
return action($action);
103+
}
104104
}

0 commit comments

Comments
 (0)