Completed
Push — master ( 4d846d...34beb4 )
by Dmitry
27s
created
src/Plugin/Temporal/Schema.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
             throw new InvalidArgumentException("Nothing to initialize");
24 24
         }
25 25
 
26
-        $method = 'init' . ucfirst($name);
26
+        $method = 'init'.ucfirst($name);
27 27
         if (!method_exists($this, $method)) {
28 28
             throw new InvalidArgumentException("No initializer for $name");
29 29
         }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
     private function initLink()
35 35
     {
36
-        $this->mapper->getSchema()->once(__CLASS__ . '@link', function (Mapper $mapper) {
36
+        $this->mapper->getSchema()->once(__CLASS__.'@link', function(Mapper $mapper) {
37 37
             $mapper->getSchema()
38 38
                 ->createSpace('_temporal_link', [
39 39
                     'id'        => 'unsigned',
@@ -64,14 +64,14 @@  discard block
 block discarded – undo
64 64
                 ->addIndex(['entity', 'id', 'begin']);
65 65
         });
66 66
 
67
-        $this->mapper->getSchema()->once(__CLASS__ . '@link-idle', function (Mapper $mapper) {
67
+        $this->mapper->getSchema()->once(__CLASS__.'@link-idle', function(Mapper $mapper) {
68 68
             $mapper->getSchema()->getSpace('_temporal_link')->addProperty('idle', 'unsigned');
69 69
         });
70 70
     }
71 71
 
72 72
     private function initOverride()
73 73
     {
74
-        $this->mapper->getSchema()->once(__CLASS__ . '@states', function (Mapper $mapper) {
74
+        $this->mapper->getSchema()->once(__CLASS__.'@states', function(Mapper $mapper) {
75 75
             $mapper->getSchema()
76 76
                 ->createSpace('_temporal_override', [
77 77
                     'entity'     => 'unsigned',
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
                 ->addIndex(['entity', 'id', 'begin']);
96 96
         });
97 97
 
98
-        $this->mapper->getSchema()->once(__CLASS__ . '@override-idle', function (Mapper $mapper) {
98
+        $this->mapper->getSchema()->once(__CLASS__.'@override-idle', function(Mapper $mapper) {
99 99
             $mapper->getSchema()->getSpace('_temporal_override')->addProperty('idle', 'unsigned');
100 100
         });
101 101
     }
102 102
 
103 103
     private function initReference()
104 104
     {
105
-        $this->mapper->getSchema()->once(__CLASS__ . '@reference', function (Mapper $mapper) {
105
+        $this->mapper->getSchema()->once(__CLASS__.'@reference', function(Mapper $mapper) {
106 106
             $mapper->getSchema()
107 107
                 ->createSpace('_temporal_reference', [
108 108
                     'idle'       => 'unsigned',
Please login to merge, or discard this patch.
src/Schema.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         }
42 42
 
43 43
         if (!in_array($options['engine'], ['memtx', 'vinyl'])) {
44
-            throw new Exception("Invalid engine " . $options['engine']);
44
+            throw new Exception("Invalid engine ".$options['engine']);
45 45
         }
46 46
 
47 47
         [$id] = $this->mapper->getClient()->evaluate("
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
     public function once(string $name, Closure $callback)
163 163
     {
164
-        $key = 'mapper-once' . $name;
164
+        $key = 'mapper-once'.$name;
165 165
         $row = $this->mapper->findOne('_schema', ['key' => $key]);
166 166
         if (!$row) {
167 167
             $this->mapper->create('_schema', ['key' => $key]);
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 
172 172
     public function forgetOnce(string $name)
173 173
     {
174
-        $key = 'mapper-once' . $name;
174
+        $key = 'mapper-once'.$name;
175 175
         $row = $this->mapper->findOne('_schema', ['key' => $key]);
176 176
         if ($row) {
177 177
             $this->mapper->remove($row);
Please login to merge, or discard this patch.
src/Bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
             if (!is_object($migration)) {
34 34
                 $migration = new $migration();
35 35
             }
36
-            $schema->once(get_class($migration), function () use ($migration) {
36
+            $schema->once(get_class($migration), function() use ($migration) {
37 37
                 $migration->migrate($this->mapper);
38 38
             });
39 39
         }
Please login to merge, or discard this patch.
src/Repository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
         foreach ($this->keys as $_) {
89 89
             if ($this->keys[$_] == $key) {
90
-                throw new Exception($this->space->getName() . ' ' . json_encode($key) . ' exists');
90
+                throw new Exception($this->space->getName().' '.json_encode($key).' exists');
91 91
             }
92 92
         }
93 93
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     {
151 151
         $entity = $this->findOne($params);
152 152
         if (!$entity) {
153
-            throw new Exception("No " . $this->getSpace()->getName() . ' found using ' . json_encode($params));
153
+            throw new Exception("No ".$this->getSpace()->getName().' found using '.json_encode($params));
154 154
         }
155 155
         return $entity;
156 156
     }
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         $space = $this->space;
199 199
         $index = $space->castIndex($params);
200 200
         if ($index === null) {
201
-            throw new Exception("No index for params " . json_encode($params));
201
+            throw new Exception("No index for params ".json_encode($params));
202 202
         }
203 203
 
204 204
         $criteria = Criteria::index($index)
Please login to merge, or discard this patch.
src/Plugin/Sequence.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             return;
43 43
         }
44 44
 
45
-        if (array_key_exists($name . '_seq', $this->sequences)) {
45
+        if (array_key_exists($name.'_seq', $this->sequences)) {
46 46
             // use tarantool standard sequence name
47 47
             return;
48 48
         }
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
 
69 69
         $name = $space->getName();
70 70
         if (!array_key_exists($name, $this->sequences)) {
71
-            if (array_key_exists($name . '_seq', $this->sequences)) {
71
+            if (array_key_exists($name.'_seq', $this->sequences)) {
72 72
                 // use tarantool standard sequence name
73 73
                 $name .= '_seq';
74 74
             }
75 75
         }
76 76
 
77
-        $next = $this->mapper->getClient()->call('box.sequence.' . $name . ':next');
77
+        $next = $this->mapper->getClient()->call('box.sequence.'.$name.':next');
78 78
 
79 79
         return $next[0];
80 80
     }
Please login to merge, or discard this patch.