@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | return []; |
136 | 136 | } |
137 | 137 | |
138 | - $primaryKeys = Collection::make($keys)->values()->map(function ($key) { |
|
138 | + $primaryKeys = Collection::make($keys)->values()->map(function($key) { |
|
139 | 139 | return $this->makePrimaryKey($key); |
140 | 140 | }); |
141 | 141 | |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | |
146 | 146 | $response = $this->ots->batchGetRow($request); |
147 | 147 | |
148 | - $results = Collection::make($keys)->values()->mapWithKeys(function ($key) { |
|
148 | + $results = Collection::make($keys)->values()->mapWithKeys(function($key) { |
|
149 | 149 | return [$key => null]; |
150 | 150 | })->toArray(); |
151 | 151 | |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | return true; |
178 | 178 | } |
179 | 179 | |
180 | - $rows = Collection::make($values)->map(function ($value, $key) use ($seconds) { |
|
180 | + $rows = Collection::make($values)->map(function($value, $key) use ($seconds) { |
|
181 | 181 | return [ |
182 | 182 | 'operation_type' => OperationTypeConst::CONST_PUT, |
183 | 183 | 'condition' => RowExistenceExpectationConst::CONST_IGNORE, |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | */ |
217 | 217 | public function increment($key, $value = 1) |
218 | 218 | { |
219 | - return $this->incrementOrDecrement($key, $value, function ($current, $value) { |
|
219 | + return $this->incrementOrDecrement($key, $value, function($current, $value) { |
|
220 | 220 | return $current + $value; |
221 | 221 | }); |
222 | 222 | } |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | */ |
227 | 227 | public function decrement($key, $value = 1) |
228 | 228 | { |
229 | - return $this->incrementOrDecrement($key, $value, function ($current, $value) { |
|
229 | + return $this->incrementOrDecrement($key, $value, function($current, $value) { |
|
230 | 230 | return $current - $value; |
231 | 231 | }); |
232 | 232 | } |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | return false; |
247 | 247 | } |
248 | 248 | |
249 | - $new = $callback((int) $current, $value); |
|
249 | + $new = $callback((int)$current, $value); |
|
250 | 250 | |
251 | 251 | $request = [ |
252 | 252 | 'table_name' => $this->table, |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | |
34 | 34 | protected function registerDatabaseExtend() |
35 | 35 | { |
36 | - $this->app->resolving('db', function ($db) { |
|
36 | + $this->app->resolving('db', function($db) { |
|
37 | 37 | /** @var \Illuminate\Database\DatabaseManager $db */ |
38 | - $db->extend('ots', function ($config, $name) { |
|
38 | + $db->extend('ots', function($config, $name) { |
|
39 | 39 | $config['name'] = $name; |
40 | 40 | |
41 | 41 | return new Connection($config); |
@@ -45,9 +45,9 @@ discard block |
||
45 | 45 | |
46 | 46 | protected function registerCacheExtend() |
47 | 47 | { |
48 | - $this->app->resolving('cache', function ($cache) { |
|
48 | + $this->app->resolving('cache', function($cache) { |
|
49 | 49 | /** @var \Illuminate\Cache\CacheManager $cache */ |
50 | - $cache->extend('ots', function ($app, $config) { |
|
50 | + $cache->extend('ots', function($app, $config) { |
|
51 | 51 | /** @var \Illuminate\Cache\CacheManager $this */ |
52 | 52 | |
53 | 53 | /** @var Connection $connection */ |