@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | |
36 | 36 | protected function registerDatabaseExtend() |
37 | 37 | { |
38 | - $this->app->resolving('db', function ($db) { |
|
38 | + $this->app->resolving('db', function($db) { |
|
39 | 39 | /** @var DatabaseManager $db */ |
40 | - $db->extend('ots', function ($config, $name) { |
|
40 | + $db->extend('ots', function($config, $name) { |
|
41 | 41 | $config['name'] = $name; |
42 | 42 | return new Connection($config); |
43 | 43 | }); |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | |
47 | 47 | protected function registerCacheExtend() |
48 | 48 | { |
49 | - $this->app->resolving('cache', function ($cache) { |
|
49 | + $this->app->resolving('cache', function($cache) { |
|
50 | 50 | /** @var CacheManager $cache */ |
51 | - $cache->extend('ots', function ($app, $config) { |
|
51 | + $cache->extend('ots', function($app, $config) { |
|
52 | 52 | /** @var CacheManager $this */ |
53 | 53 | |
54 | 54 | /** @var Connection $connection */ |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | return []; |
147 | 147 | } |
148 | 148 | |
149 | - $primaryKeys = Collection::make($keys)->values()->map(function ($key) { |
|
149 | + $primaryKeys = Collection::make($keys)->values()->map(function($key) { |
|
150 | 150 | return $this->makePrimaryKey($key); |
151 | 151 | }); |
152 | 152 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | |
163 | 163 | $response = $this->getOts()->batchGetRow($request); |
164 | 164 | |
165 | - $results = Collection::make($keys)->values()->mapWithKeys(function ($key) { |
|
165 | + $results = Collection::make($keys)->values()->mapWithKeys(function($key) { |
|
166 | 166 | return [$key => null]; |
167 | 167 | })->toArray(); |
168 | 168 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | return true; |
197 | 197 | } |
198 | 198 | |
199 | - $rows = Collection::make($values)->map(function ($value, $key) use ($seconds) { |
|
199 | + $rows = Collection::make($values)->map(function($value, $key) use ($seconds) { |
|
200 | 200 | return [ |
201 | 201 | 'operation_type' => OperationTypeConst::CONST_PUT, |
202 | 202 | 'condition' => RowExistenceExpectationConst::CONST_IGNORE, |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | */ |
239 | 239 | public function increment($key, $value = 1) |
240 | 240 | { |
241 | - return $this->incrementOrDecrement($key, $value, function ($current, $value) { |
|
241 | + return $this->incrementOrDecrement($key, $value, function($current, $value) { |
|
242 | 242 | return $current + $value; |
243 | 243 | }); |
244 | 244 | } |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | */ |
251 | 251 | public function decrement($key, $value = 1) |
252 | 252 | { |
253 | - return $this->incrementOrDecrement($key, $value, function ($current, $value) { |
|
253 | + return $this->incrementOrDecrement($key, $value, function($current, $value) { |
|
254 | 254 | return $current - $value; |
255 | 255 | }); |
256 | 256 | } |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | return false; |
270 | 270 | } |
271 | 271 | |
272 | - $new = $callback((int) $current, $value); |
|
272 | + $new = $callback((int)$current, $value); |
|
273 | 273 | |
274 | 274 | $request = [ |
275 | 275 | 'table_name' => $this->getTable(), |