@@ -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) |
@@ -18,7 +18,7 @@ |
||
18 | 18 | public function fee(Wallet $wallet, int $amount): int |
19 | 19 | { |
20 | 20 | if ($wallet instanceof Taxing) { |
21 | - return (int)($amount * $wallet->getFeePercent() / 100); |
|
21 | + return (int) ($amount * $wallet->getFeePercent() / 100); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | return 0; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $this->exists or $this->save(); |
113 | 113 | $proxy = app(ProxyService::class); |
114 | 114 | if (!$proxy->has($this->getKey())) { |
115 | - $proxy->set($this->getKey(), (int)($this->attributes['balance'] ?? 0)); |
|
115 | + $proxy->set($this->getKey(), (int) ($this->attributes['balance'] ?? 0)); |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | return $proxy[$this->getKey()]; |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | */ |
163 | 163 | public function transfer(Wallet $wallet, int $amount, ?array $meta = null, string $status = Transfer::STATUS_TRANSFER): Transfer |
164 | 164 | { |
165 | - return DB::transaction(function () use ($amount, $wallet, $meta, $status) { |
|
165 | + return DB::transaction(function() use ($amount, $wallet, $meta, $status) { |
|
166 | 166 | $fee = app(WalletService::class) |
167 | 167 | ->fee($wallet, $amount); |
168 | 168 | |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | */ |
276 | 276 | public function forceTransfer(Wallet $wallet, int $amount, ?array $meta = null, string $status = Transfer::STATUS_TRANSFER): Transfer |
277 | 277 | { |
278 | - return DB::transaction(function () use ($amount, $wallet, $meta, $status) { |
|
278 | + return DB::transaction(function() use ($amount, $wallet, $meta, $status) { |
|
279 | 279 | $fee = app(WalletService::class) |
280 | 280 | ->fee($wallet, $amount); |
281 | 281 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | throw new ProductEnded(trans('wallet::errors.product_stock')); |
27 | 27 | } |
28 | 28 | |
29 | - return DB::transaction(function () use ($cart) { |
|
29 | + return DB::transaction(function() use ($cart) { |
|
30 | 30 | $results = []; |
31 | 31 | foreach ($cart->getItems() as $product) { |
32 | 32 | $results[] = $this->transfer( |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | throw new ProductEnded(trans('wallet::errors.product_stock')); |
68 | 68 | } |
69 | 69 | |
70 | - return DB::transaction(function () use ($cart, $force) { |
|
70 | + return DB::transaction(function() use ($cart, $force) { |
|
71 | 71 | |
72 | 72 | $results = []; |
73 | 73 | foreach ($cart->getItems() as $product) { |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | */ |
130 | 130 | public function refundCart(Cart $cart, bool $force = null, bool $gifts = null): bool |
131 | 131 | { |
132 | - return DB::transaction(function () use ($cart, $force, $gifts) { |
|
132 | + return DB::transaction(function() use ($cart, $force, $gifts) { |
|
133 | 133 | |
134 | 134 | $results = []; |
135 | 135 | $transfers = $cart->hasPaid($this, $gifts); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | */ |
20 | 20 | public function enforce(Wallet $self, array $transactions): array |
21 | 21 | { |
22 | - return DB::transaction(function () use ($self, $transactions) { |
|
22 | + return DB::transaction(function() use ($self, $transactions) { |
|
23 | 23 | $amount = 0; |
24 | 24 | $objects = []; |
25 | 25 | foreach ($transactions as $transaction) { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function assemble(array $brings): array |
44 | 44 | { |
45 | - return DB::transaction(function () use ($brings) { |
|
45 | + return DB::transaction(function() use ($brings) { |
|
46 | 46 | $objects = []; |
47 | 47 | foreach ($brings as $bring) { |
48 | 48 | $objects[] = $bring->create(); |