Passed
Pull Request — master (#11)
by
unknown
04:16
created
database/migrations/2019_12_01_000001_create_openvidu_cache_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('openvidu_cache', function (Blueprint $table) {
16
+        Schema::create('openvidu_cache', function(Blueprint $table) {
17 17
             $table->string('key')->unique();
18 18
             $table->text('value');
19 19
             $table->integer('expiration');
Please login to merge, or discard this patch.
src/Connection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     public function unpublish(string $streamId)
125 125
     {
126
-        $this->publishers = array_filter($this->publishers, function (Publisher $publisher) use ($streamId) {
126
+        $this->publishers = array_filter($this->publishers, function(Publisher $publisher) use ($streamId) {
127 127
             return $streamId !== $publisher->getStreamId();
128 128
         });
129 129
     }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     public function unsubscribe(string $streamId)
136 136
     {
137 137
         if (!empty($this->subscribers)) {
138
-            $this->subscribers = array_filter($this->subscribers, function ($subscriber) use ($streamId) {
138
+            $this->subscribers = array_filter($this->subscribers, function($subscriber) use ($streamId) {
139 139
                 if (is_string($subscriber)) {
140 140
                     return $subscriber !== $streamId;
141 141
                 }
Please login to merge, or discard this patch.
src/Cache/SessionStore.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             return;
104 104
         }
105 105
 
106
-        $cache = is_array($cache) ? (object) $cache : $cache;
106
+        $cache = is_array($cache) ? (object)$cache : $cache;
107 107
 
108 108
         // If this cache expiration date is past the current time, we will remove this
109 109
         // item from the cache. Then we will return a null value since the cache is
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             return;
163 163
         }
164 164
 
165
-        $cache = is_array($cache) ? (object) $cache : $cache;
165
+        $cache = is_array($cache) ? (object)$cache : $cache;
166 166
         // If this cache expiration date is past the current time, we will remove this
167 167
         // item from the cache. Then we will return a null value since the cache is
168 168
         // expired. We will use "Carbon" to make this comparison with the column.
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
      */
190 190
     public function increment($key, $value = 1)
191 191
     {
192
-        return $this->incrementOrDecrement($key, $value, function ($current, $value) {
192
+        return $this->incrementOrDecrement($key, $value, function($current, $value) {
193 193
             return $current + $value;
194 194
         });
195 195
     }
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
      */
206 206
     protected function incrementOrDecrement($key, $value, Closure $callback)
207 207
     {
208
-        return $this->connection->transaction(function () use ($key, $value, $callback) {
208
+        return $this->connection->transaction(function() use ($key, $value, $callback) {
209 209
 
210 210
 
211 211
             $cache = $this->table()->where('key', $key)
@@ -218,14 +218,14 @@  discard block
 block discarded – undo
218 218
                 return false;
219 219
             }
220 220
 
221
-            $cache = is_array($cache) ? (object) $cache : $cache;
221
+            $cache = is_array($cache) ? (object)$cache : $cache;
222 222
 
223 223
             $current = $this->unserialize($cache->value);
224 224
 
225 225
             // Here we'll call this callback function that was given to the function which
226 226
             // is used to either increment or decrement the function. We use a callback
227 227
             // so we do not have to recreate all this logic in each of the functions.
228
-            $new = $callback((int) $current, $value);
228
+            $new = $callback((int)$current, $value);
229 229
 
230 230
             if (!is_numeric($current)) {
231 231
                 return false;
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
      */
253 253
     public function decrement($key, $value = 1)
254 254
     {
255
-        return $this->incrementOrDecrement($key, $value, function ($current, $value) {
255
+        return $this->incrementOrDecrement($key, $value, function($current, $value) {
256 256
             return $current - $value;
257 257
         });
258 258
     }
Please login to merge, or discard this patch.
src/Exceptions/OpenViduRecordingResolutionException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
 
19 19
     public function __toString()
20 20
     {
21
-        return __CLASS__.":[{$this->code}]:{$this->message}\n";
21
+        return __CLASS__ . ":[{$this->code}]:{$this->message}\n";
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
src/Exceptions/OpenViduRecordingNotFoundException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
 
19 19
     public function __toString()
20 20
     {
21
-        return __CLASS__.":[{$this->code}]:{$this->message}\n";
21
+        return __CLASS__ . ":[{$this->code}]:{$this->message}\n";
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
src/Exceptions/OpenViduException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
 
19 19
     public function __toString()
20 20
     {
21
-        return __CLASS__.":[{$this->code}]:{$this->message}\n";
21
+        return __CLASS__ . ":[{$this->code}]:{$this->message}\n";
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
src/Exceptions/OpenViduTokenCantCreateException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
 
19 19
     public function __toString()
20 20
     {
21
-        return __CLASS__.":[{$this->code}]:{$this->message}\n";
21
+        return __CLASS__ . ":[{$this->code}]:{$this->message}\n";
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
src/Exceptions/OpenViduSessionNotFoundException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
 
19 19
     public function __toString()
20 20
     {
21
-        return __CLASS__.":[{$this->code}]:{$this->message}\n";
21
+        return __CLASS__ . ":[{$this->code}]:{$this->message}\n";
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
src/Exceptions/OpenViduSessionCantRecordingException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
 
19 19
     public function __toString()
20 20
     {
21
-        return __CLASS__.":[{$this->code}]:{$this->message}\n";
21
+        return __CLASS__ . ":[{$this->code}]:{$this->message}\n";
22 22
     }
23 23
 }
Please login to merge, or discard this patch.