@@ -68,7 +68,7 @@ |
||
| 68 | 68 | ->setModel($this->transfers()->getMorphClass()); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - return DB::transaction(function () use ($product, $transfer) { |
|
| 71 | + return DB::transaction(function() use ($product, $transfer) { |
|
| 72 | 72 | $product->transfer($this, $product->getAmountProduct(), $product->getMetaProduct()); |
| 73 | 73 | return $transfer->update(['refund' => 1]); |
| 74 | 74 | }); |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | public function transfer(Wallet $wallet, int $amount, ?array $meta = null): Transfer |
| 101 | 101 | { |
| 102 | - return DB::transaction(function () use ($amount, $wallet, $meta) { |
|
| 102 | + return DB::transaction(function() use ($amount, $wallet, $meta) { |
|
| 103 | 103 | $withdraw = $this->withdraw($amount, $meta); |
| 104 | 104 | $deposit = $wallet->deposit($amount, $meta); |
| 105 | 105 | return $this->assemble($wallet, $withdraw, $deposit); |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | */ |
| 130 | 130 | public function forceTransfer(Wallet $wallet, int $amount, ?array $meta = null): Transfer |
| 131 | 131 | { |
| 132 | - return DB::transaction(function () use ($amount, $wallet, $meta) { |
|
| 132 | + return DB::transaction(function() use ($amount, $wallet, $meta) { |
|
| 133 | 133 | $withdraw = $this->forceWithdraw($amount, $meta); |
| 134 | 134 | $deposit = $wallet->deposit($amount, $meta); |
| 135 | 135 | return $this->assemble($wallet, $withdraw, $deposit); |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | */ |
| 239 | 239 | $collection = $this->getRelation('balance'); |
| 240 | 240 | $relation = $collection->first(); |
| 241 | - static::$cachedBalances[$this->getKey()] = (int)($relation->total ?? 0); |
|
| 241 | + static::$cachedBalances[$this->getKey()] = (int) ($relation->total ?? 0); |
|
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | return static::$cachedBalances[$this->getKey()]; |