@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | ]; |
47 | 47 | |
48 | 48 | $changes = $mapper->find('_temporal_reference', $params); |
49 | - $states = $this->generateStates($changes, function ($state, $change) { |
|
49 | + $states = $this->generateStates($changes, function($state, $change) { |
|
50 | 50 | $state->data = $change->targetId; |
51 | 51 | }); |
52 | 52 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | 'targetId' => $entityId, |
78 | 78 | 'entity' => $params['entity'], |
79 | 79 | ]); |
80 | - $aggregates = $this->generateStates($changes, function ($state, $change) { |
|
80 | + $aggregates = $this->generateStates($changes, function($state, $change) { |
|
81 | 81 | if (!in_array($change->id, $state->data)) { |
82 | 82 | $state->data[] = $change->id; |
83 | 83 | } |
@@ -232,11 +232,11 @@ discard block |
||
232 | 232 | while (!$clean) { |
233 | 233 | $clean = true; |
234 | 234 | foreach ($states as $i => $state) { |
235 | - if (array_key_exists($i+1, $states)) { |
|
236 | - $next = $states[$i+1]; |
|
235 | + if (array_key_exists($i + 1, $states)) { |
|
236 | + $next = $states[$i + 1]; |
|
237 | 237 | if (json_encode($state->data) == json_encode($next->data)) { |
238 | 238 | $states[$i]->end = $next->end; |
239 | - unset($states[$i+1]); |
|
239 | + unset($states[$i + 1]); |
|
240 | 240 | $states = array_values($states); |
241 | 241 | $clean = false; |
242 | 242 | break; |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | ]; |
265 | 265 | |
266 | 266 | $changes = $mapper->find('_temporal_override', $params); |
267 | - $states = $this->generateStates($changes, function ($state, $change) { |
|
267 | + $states = $this->generateStates($changes, function($state, $change) { |
|
268 | 268 | $state->data = array_merge($state->data, $change->data); |
269 | 269 | $state->exists = false; |
270 | 270 | }); |
@@ -344,11 +344,11 @@ discard block |
||
344 | 344 | while (!$clean) { |
345 | 345 | $clean = true; |
346 | 346 | foreach ($states as $i => $state) { |
347 | - if (array_key_exists($i+1, $states)) { |
|
348 | - $next = $states[$i+1]; |
|
347 | + if (array_key_exists($i + 1, $states)) { |
|
348 | + $next = $states[$i + 1]; |
|
349 | 349 | if (json_encode($state->data) == json_encode($next->data)) { |
350 | 350 | $state->end = $next->end; |
351 | - unset($states[$i+1]); |
|
351 | + unset($states[$i + 1]); |
|
352 | 352 | $states = array_values($states); |
353 | 353 | $clean = false; |
354 | 354 | break; |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $space->addIndex($index); |
194 | 194 | } catch (Exception $e) { |
195 | 195 | $presentation = json_encode($properties['indexes'][$i]); |
196 | - throw new Exception("Failed to add index $presentation. ". $e->getMessage(), 0, $e); |
|
196 | + throw new Exception("Failed to add index $presentation. ".$e->getMessage(), 0, $e); |
|
197 | 197 | } |
198 | 198 | } |
199 | 199 | } |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | } |
205 | 205 | if (!count($space->getIndexes())) { |
206 | 206 | if (!$space->hasProperty('id')) { |
207 | - throw new Exception("No primary index on ". $space->getName()); |
|
207 | + throw new Exception("No primary index on ".$space->getName()); |
|
208 | 208 | } |
209 | 209 | $space->addIndex(['id']); |
210 | 210 | } |