Passed
Push — master ( ccfc49...848a13 )
by Mauro
01:43
created
src/InMemoryList/Infrastructure/Persistance/RedisRepository.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         ];
71 71
 
72 72
         // persist all in a transaction
73
-        $this->client->transaction($options, function ($tx) use ($arrayChunks, $list, $ttl, $listUuid, $items, $chunkSize) {
73
+        $this->client->transaction($options, function($tx) use ($arrayChunks, $list, $ttl, $listUuid, $items, $chunkSize) {
74 74
             foreach ($arrayChunks as $chunkNumber => $item) {
75 75
                 foreach ($item as $key => $element) {
76 76
                     $listChunkUuid = $listUuid.self::SEPARATOR.self::CHUNK.'-'.($chunkNumber + 1);
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     private function getArrayChunksKeys($listUuid, $numberOfChunks)
128 128
     {
129 129
         $arrayChunksKeys = [];
130
-        for($i=0;$i<$numberOfChunks;$i++){
130
+        for ($i = 0; $i < $numberOfChunks; $i++) {
131 131
             $arrayChunksKeys[] = $listUuid.self::SEPARATOR.self::CHUNK.'-'.($i + 1);
132 132
         }
133 133
 
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         ];
153 153
 
154 154
         // delete in a transaction
155
-        $this->client->transaction($options, function ($tx) use ($listUuid, $numberOfChunks, $chunkSize, $elementUuid) {
155
+        $this->client->transaction($options, function($tx) use ($listUuid, $numberOfChunks, $chunkSize, $elementUuid) {
156 156
             for ($i = 1; $i <= $numberOfChunks; ++$i) {
157 157
                 $chunkNumber = $listUuid.self::SEPARATOR.self::CHUNK.'-'.$i;
158 158
                 $chunk = $this->client->hgetall($chunkNumber);
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
         ];
314 314
 
315 315
         // persist in a transaction
316
-        $this->client->transaction($options, function ($tx) use ($chunkNumber, $numberOfChunks, $chunkSize, $listUuid, $elementUuid, $body) {
316
+        $this->client->transaction($options, function($tx) use ($chunkNumber, $numberOfChunks, $chunkSize, $listUuid, $elementUuid, $body) {
317 317
             if (($chunkSize - count($tx->hgetall($chunkNumber))) === 0) {
318 318
                 ++$numberOfChunks;
319 319
                 $chunkNumber = $listUuid.self::SEPARATOR.self::CHUNK.'-'.$numberOfChunks;
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
         ];
371 371
 
372 372
         // persist in a transaction
373
-        $this->client->transaction($options, function ($tx) use ($numberOfChunks, $listUuid, $elementUuid, $data) {
373
+        $this->client->transaction($options, function($tx) use ($numberOfChunks, $listUuid, $elementUuid, $data) {
374 374
             for ($i = 1; $i <= $numberOfChunks; ++$i) {
375 375
                 $chunkNumber = $listUuid.self::SEPARATOR.self::CHUNK.'-'.$i;
376 376
                 $chunk = $this->client->hgetall($chunkNumber);
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
         ];
429 429
 
430 430
         // persist in a transaction
431
-        $this->client->transaction($options, function ($tx) use ($numberOfChunks, $listUuid, $ttl) {
431
+        $this->client->transaction($options, function($tx) use ($numberOfChunks, $listUuid, $ttl) {
432 432
             for ($i = 1; $i <= $numberOfChunks; ++$i) {
433 433
                 $tx->expire(
434 434
                     (string) $listUuid.self::SEPARATOR.self::CHUNK.'-'.$i,
Please login to merge, or discard this patch.