@@ -19,7 +19,7 @@ |
||
19 | 19 | */ |
20 | 20 | public function lock($self, string $name, \Closure $closure) |
21 | 21 | { |
22 | - return $this->lockProvider($self, $name, (int)config('wallet.lock.seconds')) |
|
22 | + return $this->lockProvider($self, $name, (int) config('wallet.lock.seconds')) |
|
23 | 23 | ->get($this->bindTo($self, $closure)); |
24 | 24 | } |
25 | 25 |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | public function handle(): void |
39 | 39 | { |
40 | 40 | app(ProxyService::class)->fresh(); |
41 | - DB::transaction(function() { |
|
41 | + DB::transaction(function () { |
|
42 | 42 | $wallet = config('wallet.wallet.table'); |
43 | 43 | DB::table($wallet)->update(['balance' => 0]); |
44 | 44 | |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | ->where('confirmed', true) |
77 | 77 | ->groupBy('wallet_id'); |
78 | 78 | |
79 | - $joinClause = static function(JoinClause $join) use ($wallet) { |
|
79 | + $joinClause = static function (JoinClause $join) use ($wallet) { |
|
80 | 80 | $join->on("$wallet.id", '=', 'b.wallet_id'); |
81 | 81 | }; |
82 | 82 |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | public function deposit(int $amount, ?array $meta = null, bool $confirmed = true): Transaction |
42 | 42 | { |
43 | 43 | $self = $this; |
44 | - return DB::transaction(static function() use ($self, $amount, $meta, $confirmed) { |
|
44 | + return DB::transaction(static function () use ($self, $amount, $meta, $confirmed) { |
|
45 | 45 | return app(CommonService::class) |
46 | 46 | ->deposit($self, $amount, $meta, $confirmed); |
47 | 47 | }); |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | public function forceWithdraw(int $amount, ?array $meta = null, bool $confirmed = true): Transaction |
166 | 166 | { |
167 | 167 | $self = $this; |
168 | - return DB::transaction(static function() use ($self, $amount, $meta, $confirmed) { |
|
168 | + return DB::transaction(static function () use ($self, $amount, $meta, $confirmed) { |
|
169 | 169 | return app(CommonService::class) |
170 | 170 | ->forceWithdraw($self, $amount, $meta, $confirmed); |
171 | 171 | }); |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | public function forceTransfer(Wallet $wallet, int $amount, ?array $meta = null): Transfer |
184 | 184 | { |
185 | 185 | $self = $this; |
186 | - return DB::transaction(static function() use ($self, $amount, $wallet, $meta) { |
|
186 | + return DB::transaction(static function () use ($self, $amount, $wallet, $meta) { |
|
187 | 187 | return app(CommonService::class) |
188 | 188 | ->forceTransfer($self, $wallet, $amount, $meta); |
189 | 189 | }); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | ->verifyWithdraw($this, 0, true); |
33 | 33 | |
34 | 34 | $self = $this; |
35 | - return DB::transaction(static function() use ($self, $cart) { |
|
35 | + return DB::transaction(static function () use ($self, $cart) { |
|
36 | 36 | $results = []; |
37 | 37 | foreach ($cart->getItems() as $product) { |
38 | 38 | $results[] = app(CommonService::class)->forceTransfer( |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | } |
76 | 76 | |
77 | 77 | $self = $this; |
78 | - return DB::transaction(static function() use ($self, $cart, $force) { |
|
78 | + return DB::transaction(static function () use ($self, $cart, $force) { |
|
79 | 79 | $results = []; |
80 | 80 | foreach ($cart->getItems() as $product) { |
81 | 81 | if ($force) { |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | public function refundCart(Cart $cart, bool $force = null, bool $gifts = null): bool |
139 | 139 | { |
140 | 140 | $self = $this; |
141 | - return DB::transaction(static function() use ($self, $cart, $force, $gifts) { |
|
141 | + return DB::transaction(static function () use ($self, $cart, $force, $gifts) { |
|
142 | 142 | $results = []; |
143 | 143 | $transfers = $cart->alreadyBuy($self, $gifts); |
144 | 144 | if (count($transfers) !== count($cart)) { |
@@ -22,7 +22,7 @@ |
||
22 | 22 | { |
23 | 23 | return app(LockService::class)->lock($this, __FUNCTION__, function () use ($transaction) { |
24 | 24 | $self = $this; |
25 | - return DB::transaction(static function() use ($self, $transaction) { |
|
25 | + return DB::transaction(static function () use ($self, $transaction) { |
|
26 | 26 | $wallet = app(WalletService::class) |
27 | 27 | ->getWallet($self); |
28 | 28 |
@@ -63,7 +63,7 @@ |
||
63 | 63 | * I think it is wrong to make the "assemble" method public. |
64 | 64 | * That's why I address him like this! |
65 | 65 | */ |
66 | - return DB::transaction(static function() use ($santa, $to, $product, $force) { |
|
66 | + return DB::transaction(static function () use ($santa, $to, $product, $force) { |
|
67 | 67 | $amount = $product->getAmountProduct(); |
68 | 68 | $meta = $product->getMetaProduct(); |
69 | 69 | $fee = app(WalletService::class) |