@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $this->mapper->client->call("box.sequence.$this->name:drop"); |
115 | 115 | } |
116 | 116 | |
117 | - public function find(Criteria|array|null $criteria = null, ?int $limit = null): array |
|
117 | + public function find(Criteria | array | null $criteria = null, ?int $limit = null): array |
|
118 | 118 | { |
119 | 119 | if (!$criteria) { |
120 | 120 | $criteria = Criteria::allIterator(); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | return array_map($this->getInstance(...), $tuples); |
134 | 134 | } |
135 | 135 | |
136 | - public function findOne(Criteria|array|null $criteria = null) |
|
136 | + public function findOne(Criteria | array | null $criteria = null) |
|
137 | 137 | { |
138 | 138 | $rows = $this->find($criteria, 1); |
139 | 139 | |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | return $this->getInstance($tuple); |
189 | 189 | } |
190 | 190 | |
191 | - public function findOrFail(Criteria|array|null $criteria = null) |
|
191 | + public function findOrFail(Criteria | array | null $criteria = null) |
|
192 | 192 | { |
193 | 193 | $one = $this->findOne($criteria); |
194 | 194 | if ($one) { |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | $this->indexes = $indexes; |
348 | 348 | } |
349 | 349 | |
350 | - public function update($instance, Operations|array $operations) |
|
350 | + public function update($instance, Operations | array $operations) |
|
351 | 351 | { |
352 | 352 | if (is_array($operations)) { |
353 | 353 | $data = $operations; |
@@ -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) |
@@ -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,12 +36,12 @@ 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 | } |
43 | 43 | |
44 | - public function update(string $space, $instance, Operations|array $operations) |
|
44 | + public function update(string $space, $instance, Operations | array $operations) |
|
45 | 45 | { |
46 | 46 | $this->getSpace($space)->update($instance, $operations); |
47 | 47 | } |