@@ -54,7 +54,7 @@ |
||
| 54 | 54 | /** |
| 55 | 55 | * @return Transfer |
| 56 | 56 | */ |
| 57 | - $callback = function () use ($santa, $product, $force) { |
|
| 57 | + $callback = function() use ($santa, $product, $force) { |
|
| 58 | 58 | $amount = $product->getAmountProduct(); |
| 59 | 59 | $meta = $product->getMetaProduct(); |
| 60 | 60 | $fee = app(WalletService::class) |
@@ -172,7 +172,7 @@ |
||
| 172 | 172 | */ |
| 173 | 173 | public function assemble(array $brings): array |
| 174 | 174 | { |
| 175 | - return DB::transaction(function () use ($brings) { |
|
| 175 | + return DB::transaction(function() use ($brings) { |
|
| 176 | 176 | return $this->multiBrings($brings); |
| 177 | 177 | }); |
| 178 | 178 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function deposit(int $amount, ?array $meta = null, bool $confirmed = true): Transaction |
| 47 | 47 | { |
| 48 | - return DB::transaction(function () use ($amount, $meta, $confirmed) { |
|
| 48 | + return DB::transaction(function() use ($amount, $meta, $confirmed) { |
|
| 49 | 49 | return app(CommonService::class) |
| 50 | 50 | ->deposit($this, $amount, $meta, $confirmed); |
| 51 | 51 | }); |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | */ |
| 161 | 161 | public function forceWithdraw(int $amount, ?array $meta = null, bool $confirmed = true): Transaction |
| 162 | 162 | { |
| 163 | - return DB::transaction(function () use ($amount, $meta, $confirmed) { |
|
| 163 | + return DB::transaction(function() use ($amount, $meta, $confirmed) { |
|
| 164 | 164 | return app(CommonService::class) |
| 165 | 165 | ->forceWithdraw($this, $amount, $meta, $confirmed); |
| 166 | 166 | }); |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | */ |
| 178 | 178 | public function forceTransfer(Wallet $wallet, int $amount, ?array $meta = null): Transfer |
| 179 | 179 | { |
| 180 | - return DB::transaction(function () use ($amount, $wallet, $meta) { |
|
| 180 | + return DB::transaction(function() use ($amount, $wallet, $meta) { |
|
| 181 | 181 | return app(CommonService::class) |
| 182 | 182 | ->forceTransfer($this, $wallet, $amount, $meta); |
| 183 | 183 | }); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | app(CommonService::class) |
| 32 | 32 | ->verifyWithdraw($this, 0); |
| 33 | 33 | |
| 34 | - return DB::transaction(function () use ($cart) { |
|
| 34 | + return DB::transaction(function() use ($cart) { |
|
| 35 | 35 | $results = []; |
| 36 | 36 | foreach ($cart->getItems() as $product) { |
| 37 | 37 | $results[] = app(CommonService::class)->forceTransfer( |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | throw new ProductEnded(trans('wallet::errors.product_stock')); |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | - return DB::transaction(function () use ($cart, $force) { |
|
| 76 | + return DB::transaction(function() use ($cart, $force) { |
|
| 77 | 77 | $results = []; |
| 78 | 78 | foreach ($cart->getItems() as $product) { |
| 79 | 79 | if ($force) { |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | */ |
| 136 | 136 | public function refundCart(Cart $cart, bool $force = null, bool $gifts = null): bool |
| 137 | 137 | { |
| 138 | - return DB::transaction(function () use ($cart, $force, $gifts) { |
|
| 138 | + return DB::transaction(function() use ($cart, $force, $gifts) { |
|
| 139 | 139 | $results = []; |
| 140 | 140 | $transfers = $cart->alreadyBuy($this, $gifts); |
| 141 | 141 | if (count($transfers) !== count($cart)) { |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | public function fee(Wallet $wallet, int $amount): int |
| 23 | 23 | { |
| 24 | 24 | if ($wallet instanceof Taxing) { |
| 25 | - return (int)($amount * $wallet->getFeePercent() / 100); |
|
| 25 | + return (int) ($amount * $wallet->getFeePercent() / 100); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | return 0; |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $wallet->exists or $wallet->save(); |
| 68 | 68 | $proxy = app(ProxyService::class); |
| 69 | 69 | if (!$proxy->has($wallet->getKey())) { |
| 70 | - $proxy->set($wallet->getKey(), (int)$wallet->getOriginal('balance', 0)); |
|
| 70 | + $proxy->set($wallet->getKey(), (int) $wallet->getOriginal('balance', 0)); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | return $proxy[$wallet->getKey()]; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | public function handle(): void |
| 31 | 31 | { |
| 32 | - DB::transaction(function () { |
|
| 32 | + DB::transaction(function() { |
|
| 33 | 33 | $wallet = config('wallet.wallet.table'); |
| 34 | 34 | $trans = config('wallet.transaction.table'); |
| 35 | 35 | |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | ->where('confirmed', true) |
| 39 | 39 | ->groupBy('wallet_id'); |
| 40 | 40 | |
| 41 | - $joinClause = function (JoinClause $join) use ($wallet) { |
|
| 41 | + $joinClause = function(JoinClause $join) use ($wallet) { |
|
| 42 | 42 | $join->on("$wallet.id", '=', 'b.wallet_id'); |
| 43 | 43 | }; |
| 44 | 44 | |