Completed
Push — master ( 44b865...d365d6 )
by Dmitry
04:15 queued 02:12
created
src/Plugin/Temporal.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     private function getData($entity, $id, $date, $space)
35 35
     {
36 36
         if (!$this->mapper->getSchema()->hasSpace($entity)) {
37
-            throw new Exception("invalid entity: " . $entity);
37
+            throw new Exception("invalid entity: ".$entity);
38 38
         }
39 39
 
40 40
         $entity = $this->mapper->getSchema()->getSpace($entity)->getId();
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         }
76 76
 
77 77
         if (!$this->mapper->getSchema()->hasSpace($override['entity'])) {
78
-            throw new Exception("invalid entity " . $override['entity']);
78
+            throw new Exception("invalid entity ".$override['entity']);
79 79
         }
80 80
 
81 81
         $space = $this->mapper->getSchema()->getSpace($override['entity']);
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     {
168 168
         switch ($name) {
169 169
             case 'override':
170
-                return $this->mapper->getSchema()->once(__CLASS__.'@states', function (Mapper $mapper) {
170
+                return $this->mapper->getSchema()->once(__CLASS__.'@states', function(Mapper $mapper) {
171 171
                     $mapper->getSchema()
172 172
                         ->createSpace('_override', [
173 173
                             'entity'     => 'unsigned',
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
                 });
193 193
 
194 194
             case 'link':
195
-                return $this->mapper->getSchema()->once(__CLASS__.'@link', function (Mapper $mapper) {
195
+                return $this->mapper->getSchema()->once(__CLASS__.'@link', function(Mapper $mapper) {
196 196
                     if (!$mapper->hasPlugin(Sequence::class)) {
197 197
                         $mapper->addPlugin(Sequence::class);
198 198
                     }
@@ -401,11 +401,11 @@  discard block
 block discarded – undo
401 401
         while (!$clean) {
402 402
             $clean = true;
403 403
             foreach ($states as $i => $state) {
404
-                if (array_key_exists($i+1, $states)) {
405
-                    $next = $states[$i+1];
404
+                if (array_key_exists($i + 1, $states)) {
405
+                    $next = $states[$i + 1];
406 406
                     if (!count(array_diff_assoc($state['data'], $next['data']))) {
407 407
                         $states[$i]['end'] = $next['end'];
408
-                        unset($states[$i+1]);
408
+                        unset($states[$i + 1]);
409 409
                         $states = array_values($states);
410 410
                         $clean = false;
411 411
                         break;
Please login to merge, or discard this patch.