Passed
Push — master ( 77f1b4...a6165e )
by Jacobo
03:07
created
src/Connection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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 {
Please login to merge, or discard this patch.
src/Session.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
                 }
Please login to merge, or discard this patch.