Skip to content

Commit d7cb5bd

Browse files
authored
Merge pull request #97 from bavix/scrutinizer-patch-1
Scrutinizer Auto-Fixes
2 parents 1ad2aaa + d6f6959 commit d7cb5bd

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

src/Commands/RefreshBalance.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class RefreshBalance extends Command
3838
public function handle(): void
3939
{
4040
app(ProxyService::class)->fresh();
41-
DB::transaction(function() {
41+
DB::transaction(function () {
4242
$wallet = config('wallet.wallet.table');
4343
DB::table($wallet)->update(['balance' => 0]);
4444

@@ -76,7 +76,7 @@ protected function multiUpdate(): void
7676
->where('confirmed', true)
7777
->groupBy('wallet_id');
7878

79-
$joinClause = static function(JoinClause $join) use ($wallet) {
79+
$joinClause = static function (JoinClause $join) use ($wallet) {
8080
$join->on("$wallet.id", '=', 'b.wallet_id');
8181
};
8282

src/Services/LockService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function __construct()
3434
*/
3535
public function lock($self, string $name, \Closure $closure)
3636
{
37-
return $this->lockProvider($self, $name, (int)config('wallet.lock.seconds'))
37+
return $this->lockProvider($self, $name, (int) config('wallet.lock.seconds'))
3838
->get($this->bindTo($self, $closure));
3939
}
4040

src/Traits/CanConfirm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function confirm(Transaction $transaction): bool
2222
{
2323
return app(LockService::class)->lock($this, __FUNCTION__, function () use ($transaction) {
2424
$self = $this;
25-
return DB::transaction(static function() use ($self, $transaction) {
25+
return DB::transaction(static function () use ($self, $transaction) {
2626
$wallet = app(WalletService::class)
2727
->getWallet($self);
2828

src/Traits/CartPay.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function payFreeCart(Cart $cart): array
3232
->verifyWithdraw($this, 0, true);
3333

3434
$self = $this;
35-
return DB::transaction(static function() use ($self, $cart) {
35+
return DB::transaction(static function () use ($self, $cart) {
3636
$results = [];
3737
foreach ($cart->getItems() as $product) {
3838
$results[] = app(CommonService::class)->forceTransfer(
@@ -75,7 +75,7 @@ public function payCart(Cart $cart, bool $force = null): array
7575
}
7676

7777
$self = $this;
78-
return DB::transaction(static function() use ($self, $cart, $force) {
78+
return DB::transaction(static function () use ($self, $cart, $force) {
7979
$results = [];
8080
foreach ($cart->getItems() as $product) {
8181
if ($force) {
@@ -138,7 +138,7 @@ public function safeRefundCart(Cart $cart, bool $force = null, bool $gifts = nul
138138
public function refundCart(Cart $cart, bool $force = null, bool $gifts = null): bool
139139
{
140140
$self = $this;
141-
return DB::transaction(static function() use ($self, $cart, $force, $gifts) {
141+
return DB::transaction(static function () use ($self, $cart, $force, $gifts) {
142142
$results = [];
143143
$transfers = $cart->alreadyBuy($self, $gifts);
144144
if (count($transfers) !== count($cart)) {

src/Traits/HasGift.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function gift(Wallet $to, Product $product, bool $force = null): Transfer
6363
* I think it is wrong to make the "assemble" method public.
6464
* That's why I address him like this!
6565
*/
66-
return DB::transaction(static function() use ($santa, $to, $product, $force) {
66+
return DB::transaction(static function () use ($santa, $to, $product, $force) {
6767
$amount = $product->getAmountProduct();
6868
$meta = $product->getMetaProduct();
6969
$fee = app(WalletService::class)

src/Traits/HasWallet.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ trait HasWallet
4141
public function deposit(int $amount, ?array $meta = null, bool $confirmed = true): Transaction
4242
{
4343
$self = $this;
44-
return DB::transaction(static function() use ($self, $amount, $meta, $confirmed) {
44+
return DB::transaction(static function () use ($self, $amount, $meta, $confirmed) {
4545
return app(CommonService::class)
4646
->deposit($self, $amount, $meta, $confirmed);
4747
});
@@ -165,7 +165,7 @@ public function canWithdraw(int $amount, bool $allowZero = null): bool
165165
public function forceWithdraw(int $amount, ?array $meta = null, bool $confirmed = true): Transaction
166166
{
167167
$self = $this;
168-
return DB::transaction(static function() use ($self, $amount, $meta, $confirmed) {
168+
return DB::transaction(static function () use ($self, $amount, $meta, $confirmed) {
169169
return app(CommonService::class)
170170
->forceWithdraw($self, $amount, $meta, $confirmed);
171171
});
@@ -183,7 +183,7 @@ public function forceWithdraw(int $amount, ?array $meta = null, bool $confirmed
183183
public function forceTransfer(Wallet $wallet, int $amount, ?array $meta = null): Transfer
184184
{
185185
$self = $this;
186-
return DB::transaction(static function() use ($self, $amount, $wallet, $meta) {
186+
return DB::transaction(static function () use ($self, $amount, $wallet, $meta) {
187187
return app(CommonService::class)
188188
->forceTransfer($self, $wallet, $amount, $meta);
189189
});

0 commit comments

Comments
 (0)