Completed
Push — master ( 1a8571...2d873c )
by Dmitry
01:49
created
src/Plugin/Temporal.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
                 'entityId' => $id,
225 225
                 'parent'   => $node ? $node->id : 0,
226 226
             ];
227
-            if (count($config) == $i+1) {
227
+            if (count($config) == $i + 1) {
228 228
                 $params['begin'] = $link['begin'];
229 229
                 $params['timestamp'] = 0;
230 230
             }
@@ -429,11 +429,11 @@  discard block
 block discarded – undo
429 429
         while (!$clean) {
430 430
             $clean = true;
431 431
             foreach ($states as $i => $state) {
432
-                if (array_key_exists($i+1, $states)) {
433
-                    $next = $states[$i+1];
432
+                if (array_key_exists($i + 1, $states)) {
433
+                    $next = $states[$i + 1];
434 434
                     if (json_encode($state['data']) == json_encode($next['data'])) {
435 435
                         $states[$i]['end'] = $next['end'];
436
-                        unset($states[$i+1]);
436
+                        unset($states[$i + 1]);
437 437
                         $states = array_values($states);
438 438
                         $clean = false;
439 439
                         break;
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
             $this->mapper->addPlugin(Sequence::class);
454 454
         }
455 455
 
456
-        $this->mapper->getSchema()->once(__CLASS__.'@entity', function (Mapper $mapper) {
456
+        $this->mapper->getSchema()->once(__CLASS__.'@entity', function(Mapper $mapper) {
457 457
             $this->mapper->getSchema()
458 458
                 ->createSpace('_temporal_entity', [
459 459
                     'id'   => 'unsigned',
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
     {
476 476
         switch ($name) {
477 477
             case 'override':
478
-                $this->mapper->getSchema()->once(__CLASS__.'@states', function (Mapper $mapper) {
478
+                $this->mapper->getSchema()->once(__CLASS__.'@states', function(Mapper $mapper) {
479 479
                     $mapper->getSchema()
480 480
                         ->createSpace('_temporal_override', [
481 481
                             'entity'     => 'unsigned',
@@ -498,13 +498,13 @@  discard block
 block discarded – undo
498 498
                         ])
499 499
                         ->addIndex(['entity', 'id', 'begin']);
500 500
                 });
501
-                $this->mapper->getSchema()->once(__CLASS__.'@override-idle', function (Mapper $mapper) {
501
+                $this->mapper->getSchema()->once(__CLASS__.'@override-idle', function(Mapper $mapper) {
502 502
                     $mapper->getSchema()->getSpace('_temporal_override')->addProperty('idle', 'unsigned');
503 503
                 });
504 504
                 return;
505 505
 
506 506
             case 'link':
507
-                return $this->mapper->getSchema()->once(__CLASS__.'@link', function (Mapper $mapper) {
507
+                return $this->mapper->getSchema()->once(__CLASS__.'@link', function(Mapper $mapper) {
508 508
                     $mapper->getSchema()
509 509
                         ->createSpace('_temporal_link', [
510 510
                             'id'        => 'unsigned',
Please login to merge, or discard this patch.