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

Commit f1a14fb

Browse files
committed
Passing $appId on createRecord()
1 parent c6c3877 commit f1a14fb

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/Statistics/Logger/MemoryStatisticsLogger.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function save()
103103
continue;
104104
}
105105

106-
$this->createRecord($statistic);
106+
$this->createRecord($statistic, $appId);
107107

108108
$currentConnectionCount = $this->channelManager->getConnectionCount($appId);
109109

@@ -140,9 +140,10 @@ public function getStatistics(): array
140140
* Create a new record using the Statistic Driver.
141141
*
142142
* @param Statistic $statistic
143+
* @param mixed $appId
143144
* @return void
144145
*/
145-
public function createRecord(Statistic $statistic)
146+
public function createRecord(Statistic $statistic, $appId)
146147
{
147148
$this->driver::create($statistic->toArray());
148149
}

src/Statistics/Logger/RedisStatisticsLogger.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function save()
122122
continue;
123123
}
124124

125-
$this->createRecord($statistic);
125+
$this->createRecord($statistic, $appId);
126126

127127
$currentConnectionCount = $this->channelManager->getConnectionCount($appId);
128128

@@ -203,9 +203,10 @@ protected function lock()
203203
* Create a new record using the Statistic Driver.
204204
*
205205
* @param array $statistic
206+
* @param mixed $appId
206207
* @return void
207208
*/
208-
protected function createRecord(array $statistic): void
209+
protected function createRecord(array $statistic, $appId): void
209210
{
210211
$this->driver::create([
211212
'app_id' => $appId,

0 commit comments

Comments
 (0)