@@ -420,11 +420,11 @@ discard block |
||
| 420 | 420 | while (!$clean) { |
| 421 | 421 | $clean = true; |
| 422 | 422 | foreach ($states as $i => $state) { |
| 423 | - if (array_key_exists($i+1, $states)) { |
|
| 424 | - $next = $states[$i+1]; |
|
| 423 | + if (array_key_exists($i + 1, $states)) { |
|
| 424 | + $next = $states[$i + 1]; |
|
| 425 | 425 | if (json_encode($state['data']) == json_encode($next['data'])) { |
| 426 | 426 | $states[$i]['end'] = $next['end']; |
| 427 | - unset($states[$i+1]); |
|
| 427 | + unset($states[$i + 1]); |
|
| 428 | 428 | $states = array_values($states); |
| 429 | 429 | $clean = false; |
| 430 | 430 | break; |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | $this->mapper->addPlugin(Sequence::class); |
| 445 | 445 | } |
| 446 | 446 | |
| 447 | - $this->mapper->getSchema()->once(__CLASS__.'@entity', function (Mapper $mapper) { |
|
| 447 | + $this->mapper->getSchema()->once(__CLASS__.'@entity', function(Mapper $mapper) { |
|
| 448 | 448 | $this->mapper->getSchema() |
| 449 | 449 | ->createSpace('_temporal_entity', [ |
| 450 | 450 | 'id' => 'unsigned', |
@@ -466,7 +466,7 @@ discard block |
||
| 466 | 466 | { |
| 467 | 467 | switch ($name) { |
| 468 | 468 | case 'override': |
| 469 | - $this->mapper->getSchema()->once(__CLASS__.'@states', function (Mapper $mapper) { |
|
| 469 | + $this->mapper->getSchema()->once(__CLASS__.'@states', function(Mapper $mapper) { |
|
| 470 | 470 | $mapper->getSchema() |
| 471 | 471 | ->createSpace('_temporal_override', [ |
| 472 | 472 | 'entity' => 'unsigned', |
@@ -489,13 +489,13 @@ discard block |
||
| 489 | 489 | ]) |
| 490 | 490 | ->addIndex(['entity', 'id', 'begin']); |
| 491 | 491 | }); |
| 492 | - $this->mapper->getSchema()->once(__CLASS__.'@override-idle', function (Mapper $mapper) { |
|
| 492 | + $this->mapper->getSchema()->once(__CLASS__.'@override-idle', function(Mapper $mapper) { |
|
| 493 | 493 | $mapper->getSchema()->getSpace('_temporal_override')->addProperty('idle', 'unsigned'); |
| 494 | 494 | }); |
| 495 | 495 | return; |
| 496 | 496 | |
| 497 | 497 | case 'link': |
| 498 | - return $this->mapper->getSchema()->once(__CLASS__.'@link', function (Mapper $mapper) { |
|
| 498 | + return $this->mapper->getSchema()->once(__CLASS__.'@link', function(Mapper $mapper) { |
|
| 499 | 499 | $mapper->getSchema() |
| 500 | 500 | ->createSpace('_temporal_link', [ |
| 501 | 501 | 'id' => 'unsigned', |