Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon committed Nov 21, 2023
1 parent 94c0fc8 commit beae7d1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Managers/ArrayChannelManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,15 @@ public function channels(string $channel = null): array|Channel
$this->applications[$this->application->id()] = [];
}

$channels = $this->applications[$this->application->id()];

if ($channel) {
if (! isset($channels[$channel])) {
if (! isset($this->applications[$this->application->id()][$channel])) {
$this->applications[$this->application->id()][$channel] = ChannelBroker::create($channel);
}

return $this->applications[$this->application->id()][$channel];
}

return $channels ?: [];
return $this->applications[$this->application->id()] ?? [];
}

/**
Expand Down

0 comments on commit beae7d1

Please sign in to comment.