@@ -48,17 +48,17 @@ discard block |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | if (!$createFunction) { |
51 | - $query = 'local ' . implode(', ', array_keys($params)) . ' = ...' . PHP_EOL . $query; |
|
51 | + $query = 'local '.implode(', ', array_keys($params)).' = ...'.PHP_EOL.$query; |
|
52 | 52 | return $this->client->evaluate($query, ...array_values($params)); |
53 | 53 | } |
54 | 54 | |
55 | - $name = 'evaluate_' . md5($query . json_encode(array_keys($params))); |
|
55 | + $name = 'evaluate_'.md5($query.json_encode(array_keys($params))); |
|
56 | 56 | try { |
57 | 57 | return $this->client->call($name, ...array_values($params)); |
58 | 58 | } catch (RequestFailed $e) { |
59 | 59 | if ($e->getMessage() == "Procedure '$name' is not defined") { |
60 | 60 | $body = implode(PHP_EOL, [ |
61 | - "function(" . implode(', ', array_keys($params)) . ")", |
|
61 | + "function(".implode(', ', array_keys($params)).")", |
|
62 | 62 | $query, |
63 | 63 | "end", |
64 | 64 | ]); |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | return $this->middleware->getChanges(); |
115 | 115 | } |
116 | 116 | |
117 | - public function getSpace(int|string $id): Space |
|
117 | + public function getSpace(int | string $id): Space |
|
118 | 118 | { |
119 | 119 | if (!count($this->spaces)) { |
120 | 120 | $this->setSchemaId(0); |
@@ -20,7 +20,7 @@ |
||
20 | 20 | $changes = []; |
21 | 21 | foreach ($this->mappers as $prefix => $mapper) { |
22 | 22 | foreach ($mapper->getChanges() as $change) { |
23 | - $change->space = $prefix . '.' . $change->space; |
|
23 | + $change->space = $prefix.'.'.$change->space; |
|
24 | 24 | $changes[] = $change; |
25 | 25 | } |
26 | 26 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $space = $this->mapper->getSpace($spaceId); |
38 | 38 | $tuple = $response->getBodyField(Keys::DATA)[0]; |
39 | 39 | $instance = $space->getInstance($tuple); |
40 | - $key = $spaceId . '/' . implode('/', $space->getKey($instance)); |
|
40 | + $key = $spaceId.'/'.implode('/', $space->getKey($instance)); |
|
41 | 41 | if (array_key_exists($key, $changes)) { |
42 | 42 | if ( |
43 | 43 | $changes[$key]->type == RequestTypes::getName(RequestTypes::INSERT) |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | } |
123 | 123 | } |
124 | 124 | |
125 | - public function find(Criteria|array|null $criteria = null, ?int $limit = null): array |
|
125 | + public function find(Criteria | array | null $criteria = null, ?int $limit = null): array |
|
126 | 126 | { |
127 | 127 | if (!$criteria) { |
128 | 128 | $criteria = Criteria::allIterator(); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | return array_map($this->getInstance(...), $tuples); |
142 | 142 | } |
143 | 143 | |
144 | - public function findOne(Criteria|array|null $criteria = null) |
|
144 | + public function findOne(Criteria | array | null $criteria = null) |
|
145 | 145 | { |
146 | 146 | $rows = $this->find($criteria, 1); |
147 | 147 | |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | return $this->getInstance($tuple); |
198 | 198 | } |
199 | 199 | |
200 | - public function findOrFail(Criteria|array|null $criteria = null) |
|
200 | + public function findOrFail(Criteria | array | null $criteria = null) |
|
201 | 201 | { |
202 | 202 | $one = $this->findOne($criteria); |
203 | 203 | if ($one) { |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | $this->indexes = $indexes; |
373 | 373 | } |
374 | 374 | |
375 | - public function update($instance, Operations|array $operations) |
|
375 | + public function update($instance, Operations | array $operations) |
|
376 | 376 | { |
377 | 377 | if (is_array($operations)) { |
378 | 378 | $data = $operations; |
@@ -21,12 +21,12 @@ discard block |
||
21 | 21 | $this->getSpace($space)->delete($instance); |
22 | 22 | } |
23 | 23 | |
24 | - public function find(string $space, Criteria|array|null $query = null): array |
|
24 | + public function find(string $space, Criteria | array | null $query = null): array |
|
25 | 25 | { |
26 | 26 | return $this->getSpace($space)->find($query); |
27 | 27 | } |
28 | 28 | |
29 | - public function findOne(string $space, Criteria|array|null $query = null) |
|
29 | + public function findOne(string $space, Criteria | array | null $query = null) |
|
30 | 30 | { |
31 | 31 | return $this->getSpace($space)->findOne($query); |
32 | 32 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | return $this->getSpace($space)->findOrCreate($query, $params); |
37 | 37 | } |
38 | 38 | |
39 | - public function findOrFail(string $space, Criteria|array|null $query = null) |
|
39 | + public function findOrFail(string $space, Criteria | array | null $query = null) |
|
40 | 40 | { |
41 | 41 | return $this->getSpace($space)->findOrFail($query); |
42 | 42 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | return $this->getSpace($space)->findOne(compact('id')); |
51 | 51 | } |
52 | 52 | |
53 | - public function update(string $space, $instance, Operations|array $operations) |
|
53 | + public function update(string $space, $instance, Operations | array $operations) |
|
54 | 54 | { |
55 | 55 | $this->getSpace($space)->update($instance, $operations); |
56 | 56 | } |