@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | { |
17 | 17 | $this->mapper = $mapper; |
18 | 18 | |
19 | - $this->mapper->getSchema()->once(__CLASS__.'_states', function (Mapper $mapper) { |
|
19 | + $this->mapper->getSchema()->once(__CLASS__.'_states', function(Mapper $mapper) { |
|
20 | 20 | $mapper->getSchema() |
21 | 21 | ->createSpace('_override', [ |
22 | 22 | 'entity' => 'unsigned', |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | } |
82 | 82 | |
83 | 83 | if (!$this->mapper->getSchema()->hasSpace($override['entity'])) { |
84 | - throw new Exception("invalid entity " . $override['entity']); |
|
84 | + throw new Exception("invalid entity ".$override['entity']); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | $space = $this->mapper->getSchema()->getSpace($override['entity']); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | public function state($entity, $id, $date) |
106 | 106 | { |
107 | 107 | if (!$this->mapper->getSchema()->hasSpace($entity)) { |
108 | - throw new Exception("invalid entity: " . $entity); |
|
108 | + throw new Exception("invalid entity: ".$entity); |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | $entity = $this->mapper->getSchema()->getSpace($entity)->getId(); |
@@ -199,11 +199,11 @@ discard block |
||
199 | 199 | while (!$clean) { |
200 | 200 | $clean = true; |
201 | 201 | foreach ($states as $i => $state) { |
202 | - if (array_key_exists($i+1, $states)) { |
|
203 | - $next = $states[$i+1]; |
|
202 | + if (array_key_exists($i + 1, $states)) { |
|
203 | + $next = $states[$i + 1]; |
|
204 | 204 | if (!count(array_diff_assoc($state['data'], $next['data']))) { |
205 | 205 | $states[$i]['end'] = $next['end']; |
206 | - unset($states[$i+1]); |
|
206 | + unset($states[$i + 1]); |
|
207 | 207 | $states = array_values($states); |
208 | 208 | $clean = false; |
209 | 209 | break; |