@@ -44,7 +44,7 @@ |
||
44 | 44 | $pkIndex = null; |
45 | 45 | if ($key) { |
46 | 46 | // convert php to lua index |
47 | - $pkIndex = $space->getPrimaryField()+1; |
|
47 | + $pkIndex = $space->getPrimaryField() + 1; |
|
48 | 48 | if (!array_key_exists($key, $params) || !$params[$key]) { |
49 | 49 | $sequence = 1; |
50 | 50 | $space->getMapper() |
@@ -41,7 +41,7 @@ discard block |
||
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 |
||
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 |
||
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); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | 'id' => $this->$property, |
40 | 40 | ]); |
41 | 41 | } |
42 | - } else if(strpos($property, 'Collection') !== false) { |
|
42 | + } else if (strpos($property, 'Collection') !== false) { |
|
43 | 43 | $property = substr($property, 0, -10); |
44 | 44 | $targetSpace = $mapper->getSchema()->toUnderscore($property); |
45 | 45 | if ($mapper->getSchema()->hasSpace($targetSpace)) { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | } |
62 | 62 | } |
63 | 63 | } |
64 | - throw new BadMethodCallException("Call to undefined method ". get_class($this).'::'.$name); |
|
64 | + throw new BadMethodCallException("Call to undefined method ".get_class($this).'::'.$name); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | public function sync() : Entity |