@@ -405,11 +405,11 @@ discard block |
||
| 405 | 405 | while (!$clean) { |
| 406 | 406 | $clean = true; |
| 407 | 407 | foreach ($states as $i => $state) { |
| 408 | - if (array_key_exists($i+1, $states)) { |
|
| 409 | - $next = $states[$i+1]; |
|
| 408 | + if (array_key_exists($i + 1, $states)) { |
|
| 409 | + $next = $states[$i + 1]; |
|
| 410 | 410 | if (!count(array_diff_assoc($state['data'], $next['data']))) { |
| 411 | 411 | $states[$i]['end'] = $next['end']; |
| 412 | - unset($states[$i+1]); |
|
| 412 | + unset($states[$i + 1]); |
|
| 413 | 413 | $states = array_values($states); |
| 414 | 414 | $clean = false; |
| 415 | 415 | break; |
@@ -429,7 +429,7 @@ discard block |
||
| 429 | 429 | $this->mapper->addPlugin(Sequence::class); |
| 430 | 430 | } |
| 431 | 431 | |
| 432 | - $this->mapper->getSchema()->once(__CLASS__.'@entity', function (Mapper $mapper) { |
|
| 432 | + $this->mapper->getSchema()->once(__CLASS__.'@entity', function(Mapper $mapper) { |
|
| 433 | 433 | $this->mapper->getSchema() |
| 434 | 434 | ->createSpace('_temporal_entity', [ |
| 435 | 435 | 'id' => 'unsigned', |
@@ -451,7 +451,7 @@ discard block |
||
| 451 | 451 | { |
| 452 | 452 | switch ($name) { |
| 453 | 453 | case 'override': |
| 454 | - $this->mapper->getSchema()->once(__CLASS__.'@states', function (Mapper $mapper) { |
|
| 454 | + $this->mapper->getSchema()->once(__CLASS__.'@states', function(Mapper $mapper) { |
|
| 455 | 455 | $mapper->getSchema() |
| 456 | 456 | ->createSpace('_temporal_override', [ |
| 457 | 457 | 'entity' => 'unsigned', |
@@ -474,13 +474,13 @@ discard block |
||
| 474 | 474 | ]) |
| 475 | 475 | ->addIndex(['entity', 'id', 'begin']); |
| 476 | 476 | }); |
| 477 | - $this->mapper->getSchema()->once(__CLASS__.'@override-idle', function (Mapper $mapper) { |
|
| 477 | + $this->mapper->getSchema()->once(__CLASS__.'@override-idle', function(Mapper $mapper) { |
|
| 478 | 478 | $mapper->getSchema()->getSpace('_temporal_override')->addProperty('idle', 'unsigned'); |
| 479 | 479 | }); |
| 480 | 480 | return; |
| 481 | 481 | |
| 482 | 482 | case 'link': |
| 483 | - return $this->mapper->getSchema()->once(__CLASS__.'@link', function (Mapper $mapper) { |
|
| 483 | + return $this->mapper->getSchema()->once(__CLASS__.'@link', function(Mapper $mapper) { |
|
| 484 | 484 | $mapper->getSchema() |
| 485 | 485 | ->createSpace('_temporal_link', [ |
| 486 | 486 | 'id' => 'unsigned', |