Completed
Push — master ( 9cdeb8...362a1e )
by Dmitry
02:15
created
src/Entity.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
                 }
38 38
             }
39 39
         }
40
-        throw new BadMethodCallException("Call to undefined method ". get_class($this).'::'.$name);
40
+        throw new BadMethodCallException("Call to undefined method ".get_class($this).'::'.$name);
41 41
     }
42 42
 
43 43
     public function __debugInfo()
Please login to merge, or discard this patch.
src/Plugin/Temporal.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -183,6 +183,9 @@
 block discarded – undo
183 183
         return $this->getData($entity, $id, $date, '_temporal_override_aggregate');
184 184
     }
185 185
 
186
+    /**
187
+     * @param string $space
188
+     */
186 189
     private function getData($entity, $id, $date, $space)
187 190
     {
188 191
         $entity = $this->entityNameToId($entity);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
                 'entityId' => $id,
325 325
                 'parent'   => $node ? $node->id : 0,
326 326
             ];
327
-            if (count($config) == $i+1) {
327
+            if (count($config) == $i + 1) {
328 328
                 $params['begin'] = $link['begin'];
329 329
                 $params['timestamp'] = 0;
330 330
             }
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
             $this->mapper->addPlugin(Sequence::class);
400 400
         }
401 401
 
402
-        $this->mapper->getSchema()->once(__CLASS__.'@entity', function (Mapper $mapper) {
402
+        $this->mapper->getSchema()->once(__CLASS__.'@entity', function(Mapper $mapper) {
403 403
             $this->mapper->getSchema()
404 404
                 ->createSpace('_temporal_entity', [
405 405
                     'id'   => 'unsigned',
Please login to merge, or discard this patch.
src/Plugin/Temporal/Aggregator.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -299,6 +299,9 @@
 block discarded – undo
299 299
         $this->updateAggregation('override', $params, $changeaxis);
300 300
     }
301 301
 
302
+    /**
303
+     * @param string $type
304
+     */
302 305
     public function updateAggregation($type, $params, $changeaxis)
303 306
     {
304 307
         $isLink = $type === 'link';
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
         while (!$clean) {
82 82
             $clean = true;
83 83
             foreach ($states as $i => $state) {
84
-                if (array_key_exists($i+1, $states)) {
85
-                    $next = $states[$i+1];
84
+                if (array_key_exists($i + 1, $states)) {
85
+                    $next = $states[$i + 1];
86 86
                     if ($state->target == $next->target && $state->targetId == $next->targetId) {
87 87
                         $states[$i]['end'] = $next->end;
88
-                        unset($states[$i+1]);
88
+                        unset($states[$i + 1]);
89 89
                         $states = array_values($states);
90 90
                         $clean = false;
91 91
                         break;
@@ -322,11 +322,11 @@  discard block
 block discarded – undo
322 322
         while (!$clean) {
323 323
             $clean = true;
324 324
             foreach ($states as $i => $state) {
325
-                if (array_key_exists($i+1, $states)) {
326
-                    $next = $states[$i+1];
325
+                if (array_key_exists($i + 1, $states)) {
326
+                    $next = $states[$i + 1];
327 327
                     if (json_encode($state->data) == json_encode($next->data)) {
328 328
                         $states[$i]->end = $next->end;
329
-                        unset($states[$i+1]);
329
+                        unset($states[$i + 1]);
330 330
                         $states = array_values($states);
331 331
                         $clean = false;
332 332
                         break;
Please login to merge, or discard this patch.
src/Plugin/Temporal/Schema.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
     private function initLink()
33 33
     {
34
-        $this->mapper->getSchema()->once(__CLASS__.'@link', function (Mapper $mapper) {
34
+        $this->mapper->getSchema()->once(__CLASS__.'@link', function(Mapper $mapper) {
35 35
             $mapper->getSchema()
36 36
                 ->createSpace('_temporal_link', [
37 37
                     'id'        => 'unsigned',
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
                 ->addIndex(['entity', 'id', 'begin']);
63 63
         });
64 64
 
65
-        $this->mapper->getSchema()->once(__CLASS__.'@link-idle', function (Mapper $mapper) {
65
+        $this->mapper->getSchema()->once(__CLASS__.'@link-idle', function(Mapper $mapper) {
66 66
             $mapper->getSchema()->getSpace('_temporal_link')->addProperty('idle', 'unsigned');
67 67
         });
68 68
     }
69 69
 
70 70
     private function initOverride()
71 71
     {
72
-        $this->mapper->getSchema()->once(__CLASS__.'@states', function (Mapper $mapper) {
72
+        $this->mapper->getSchema()->once(__CLASS__.'@states', function(Mapper $mapper) {
73 73
             $mapper->getSchema()
74 74
                 ->createSpace('_temporal_override', [
75 75
                     'entity'     => 'unsigned',
@@ -93,14 +93,14 @@  discard block
 block discarded – undo
93 93
                 ->addIndex(['entity', 'id', 'begin']);
94 94
         });
95 95
 
96
-        $this->mapper->getSchema()->once(__CLASS__.'@override-idle', function (Mapper $mapper) {
96
+        $this->mapper->getSchema()->once(__CLASS__.'@override-idle', function(Mapper $mapper) {
97 97
             $mapper->getSchema()->getSpace('_temporal_override')->addProperty('idle', 'unsigned');
98 98
         });
99 99
     }
100 100
 
101 101
     private function initReference()
102 102
     {
103
-        $this->mapper->getSchema()->once(__CLASS__.'@reference', function (Mapper $mapper) {
103
+        $this->mapper->getSchema()->once(__CLASS__.'@reference', function(Mapper $mapper) {
104 104
             $mapper->getSchema()
105 105
                 ->createSpace('_temporal_reference', [
106 106
                     'idle'       => 'unsigned',
Please login to merge, or discard this patch.