This commit is contained in:
freek 2018-11-21 22:19:52 +01:00
parent 0b8e09e39e
commit f279261b57
1 changed files with 1 additions and 4 deletions

View File

@ -13,14 +13,11 @@ class ChannelManager
public function findOrCreate(string $appId, string $channelId): Channel public function findOrCreate(string $appId, string $channelId): Channel
{ {
if (! isset($this->channels[$appId][$channelId])) { if (! isset($this->channels[$appId][$channelId])) {
/**TODO: make this variable to go away */ /**TODO: make this variable to go away */
$channelClass = $this->detectChannelClass($channelId); $channelClass = $this->detectChannelClass($channelId);
array_set($this->channels, "{$appId}.{$channelId}", new $channelClass($channelId)); $this->channels[$appId][$channelId] = new $channelClass($channelId);
} }
return $this->channels[$appId][$channelId]; return $this->channels[$appId][$channelId];