Skip to content

Commit 22b1309

Browse files
authored
Merge pull request #10 from bavix/scrutinizer-patch-1
Scrutinizer Auto-Fixes
2 parents 1dd3561 + edf7093 commit 22b1309

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Traits/CanBePaid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function refund(Product $product): bool
7272
->setModel($this->transfers()->getMorphClass());
7373
}
7474

75-
return DB::transaction(function () use ($product, $transfer) {
75+
return DB::transaction(function() use ($product, $transfer) {
7676
$product->transfer($this, $product->getAmountProduct(), $product->getMetaProduct());
7777
return $transfer->update(['refund' => 1]);
7878
});

src/Traits/HasWallet.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function canWithdraw(int $amount): bool
9999
*/
100100
public function transfer(Wallet $wallet, int $amount, ?array $meta = null): Transfer
101101
{
102-
return DB::transaction(function () use ($amount, $wallet, $meta) {
102+
return DB::transaction(function() use ($amount, $wallet, $meta) {
103103
$withdraw = $this->withdraw($amount, $meta);
104104
$deposit = $wallet->deposit($amount, $meta);
105105
return $this->assemble($wallet, $withdraw, $deposit);
@@ -129,7 +129,7 @@ public function safeTransfer(Wallet $wallet, int $amount, ?array $meta = null):
129129
*/
130130
public function forceTransfer(Wallet $wallet, int $amount, ?array $meta = null): Transfer
131131
{
132-
return DB::transaction(function () use ($amount, $wallet, $meta) {
132+
return DB::transaction(function() use ($amount, $wallet, $meta) {
133133
$withdraw = $this->forceWithdraw($amount, $meta);
134134
$deposit = $wallet->deposit($amount, $meta);
135135
return $this->assemble($wallet, $withdraw, $deposit);
@@ -238,7 +238,7 @@ public function getBalanceAttribute(): int
238238
*/
239239
$collection = $this->getRelation('balance');
240240
$relation = $collection->first();
241-
static::$cachedBalances[$this->getKey()] = (int)($relation->total ?? 0);
241+
static::$cachedBalances[$this->getKey()] = (int) ($relation->total ?? 0);
242242
}
243243

244244
return static::$cachedBalances[$this->getKey()];

0 commit comments

Comments
 (0)