@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | */ |
188 | 188 | public function unpublish(string $streamId) |
189 | 189 | { |
190 | - $this->publishers = array_filter($this->publishers, function (Publisher $publisher) use ($streamId) { |
|
190 | + $this->publishers = array_filter($this->publishers, function(Publisher $publisher) use ($streamId) { |
|
191 | 191 | return $streamId !== $publisher->getStreamId(); |
192 | 192 | }); |
193 | 193 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | public function unsubscribe(string $streamId) |
200 | 200 | { |
201 | 201 | if ($this->subscribers && count($this->subscribers) > 0) { |
202 | - $this->subscribers = array_filter($this->subscribers, function ($subscriber) use ($streamId) { |
|
202 | + $this->subscribers = array_filter($this->subscribers, function($subscriber) use ($streamId) { |
|
203 | 203 | if (is_array($subscriber) && array_key_exists('streamId', $subscriber)) { |
204 | 204 | return $subscriber['streamId'] !== $streamId; |
205 | 205 | } else { |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | switch ($response->getStatusCode()) { |
213 | 213 | case 204: |
214 | 214 | $connectionClosed = null; |
215 | - $this->activeConnections = array_filter($this->activeConnections, function (Connection $connection) use ($connectionId) { |
|
215 | + $this->activeConnections = array_filter($this->activeConnections, function(Connection $connection) use ($connectionId) { |
|
216 | 216 | if ($connection->getConnectionId() !== $connectionId) { |
217 | 217 | return true; |
218 | 218 | } else { |
@@ -421,11 +421,11 @@ discard block |
||
421 | 421 | public function fromArray(array $sessionArray): Session |
422 | 422 | { |
423 | 423 | $this->sessionId = $sessionArray['sessionId']; |
424 | - $this->createdAt = $sessionArray['createdAt'] ?? null; |
|
424 | + $this->createdAt = $sessionArray['createdAt'] ?? null; |
|
425 | 425 | $this->recording = $sessionArray['recording'] ?? null; |
426 | 426 | |
427 | 427 | if (array_key_exists('properties', $sessionArray)) { |
428 | - $this->properties = SessionPropertiesBuilder::build($sessionArray['properties']); |
|
428 | + $this->properties = SessionPropertiesBuilder::build($sessionArray['properties']); |
|
429 | 429 | } |
430 | 430 | |
431 | 431 | $this->activeConnections = []; |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | } |
443 | 443 | $this->activeConnections[] = ConnectionBuilder::build($ensure, $publishers, $subscribers); |
444 | 444 | } |
445 | - usort($this->activeConnections[], function ($a, $b) { |
|
445 | + usort($this->activeConnections[], function($a, $b) { |
|
446 | 446 | if ($a->createdAt > $b->createdAt) { |
447 | 447 | return 1; |
448 | 448 | } |