Completed
Push — master ( c90c5d...562abc )
by Бабичев
18:27 queued 09:28
created
src/Traits/HasWallets.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
      */
106 106
     public function hasWallet(string $slug): bool
107 107
     {
108
-        return (bool)$this->getWallet($slug);
108
+        return (bool) $this->getWallet($slug);
109 109
     }
110 110
 
111 111
 }
Please login to merge, or discard this patch.
src/Traits/CartPay.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
             ->verifyWithdraw($this, 0);
33 33
 
34 34
         $self = $this;
35
-        return DB::transaction(static function () use ($self, $cart) {
35
+        return DB::transaction(static function() use ($self, $cart) {
36 36
             $results = [];
37 37
             foreach ($cart->getItems() as $product) {
38 38
                 $results[] = app(CommonService::class)->forceTransfer(
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         }
76 76
 
77 77
         $self = $this;
78
-        return DB::transaction(static function () use ($self, $cart, $force) {
78
+        return DB::transaction(static function() use ($self, $cart, $force) {
79 79
             $results = [];
80 80
             foreach ($cart->getItems() as $product) {
81 81
                 if ($force) {
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     public function refundCart(Cart $cart, bool $force = null, bool $gifts = null): bool
139 139
     {
140 140
         $self = $this;
141
-        return DB::transaction(static function () use ($self, $cart, $force, $gifts) {
141
+        return DB::transaction(static function() use ($self, $cart, $force, $gifts) {
142 142
             $results = [];
143 143
             $transfers = $cart->alreadyBuy($self, $gifts);
144 144
             if (count($transfers) !== count($cart)) {
Please login to merge, or discard this patch.
src/Traits/CanConfirm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     public function confirm(Transaction $transaction): bool
21 21
     {
22 22
         $self = $this;
23
-        return DB::transaction(static function () use ($self, $transaction) {
23
+        return DB::transaction(static function() use ($self, $transaction) {
24 24
             $wallet = app(WalletService::class)
25 25
                 ->getWallet($self);
26 26
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     public function forceConfirm(Transaction $transaction): bool
64 64
     {
65 65
         $self = $this;
66
-        return DB::transaction(static function () use ($self, $transaction) {
66
+        return DB::transaction(static function() use ($self, $transaction) {
67 67
 
68 68
             $wallet = app(WalletService::class)
69 69
                 ->getWallet($self);
Please login to merge, or discard this patch.
src/Traits/CanExchange.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
          */
50 50
         $from = app(WalletService::class)->getWallet($this);
51 51
 
52
-        return DB::transaction(static function () use ($from, $to, $amount, $meta) {
52
+        return DB::transaction(static function() use ($from, $to, $amount, $meta) {
53 53
             $rate = app(ExchangeService::class)->rate($from, $to);
54 54
             $fee = app(WalletService::class)->fee($to, $amount);
55 55
 
Please login to merge, or discard this patch.
src/Traits/HasWallet.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     public function deposit(int $amount, ?array $meta = null, bool $confirmed = true): Transaction
41 41
     {
42 42
         $self = $this;
43
-        return DB::transaction(static function () use ($self, $amount, $meta, $confirmed) {
43
+        return DB::transaction(static function() use ($self, $amount, $meta, $confirmed) {
44 44
             return app(CommonService::class)
45 45
                 ->deposit($self, $amount, $meta, $confirmed);
46 46
         });
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
     public function forceWithdraw(int $amount, ?array $meta = null, bool $confirmed = true): Transaction
157 157
     {
158 158
         $self = $this;
159
-        return DB::transaction(static function () use ($self, $amount, $meta, $confirmed) {
159
+        return DB::transaction(static function() use ($self, $amount, $meta, $confirmed) {
160 160
             return app(CommonService::class)
161 161
                 ->forceWithdraw($self, $amount, $meta, $confirmed);
162 162
         });
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     public function forceTransfer(Wallet $wallet, int $amount, ?array $meta = null): Transfer
175 175
     {
176 176
         $self = $this;
177
-        return DB::transaction(static function () use ($self, $amount, $wallet, $meta) {
177
+        return DB::transaction(static function() use ($self, $amount, $wallet, $meta) {
178 178
             return app(CommonService::class)
179 179
                 ->forceTransfer($self, $wallet, $amount, $meta);
180 180
         });
Please login to merge, or discard this patch.
src/Traits/HasGift.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
          * I think it is wrong to make the "assemble" method public.
62 62
          * That's why I address him like this!
63 63
          */
64
-        return DB::transaction(static function () use ($santa, $to, $product, $force) {
64
+        return DB::transaction(static function() use ($santa, $to, $product, $force) {
65 65
             $amount = $product->getAmountProduct();
66 66
             $meta = $product->getMetaProduct();
67 67
             $fee = app(WalletService::class)
Please login to merge, or discard this patch.
src/Commands/RefreshBalance.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function handle(): void
36 36
     {
37
-        DB::transaction(static function () {
37
+        DB::transaction(static function() {
38 38
             $wallet = config('wallet.wallet.table');
39 39
             $trans = config('wallet.transaction.table');
40 40
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
                 ->where('confirmed', true)
44 44
                 ->groupBy('wallet_id');
45 45
 
46
-            $joinClause = static function (JoinClause $join) use ($wallet) {
46
+            $joinClause = static function(JoinClause $join) use ($wallet) {
47 47
                 $join->on("$wallet.id", '=', 'b.wallet_id');
48 48
             };
49 49
 
Please login to merge, or discard this patch.
src/Services/WalletService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         $result = 0;
36 36
 
37 37
         if ($wallet instanceof Taxable) {
38
-            $result = (int)($amount * $wallet->getFeePercent() / 100);
38
+            $result = (int) ($amount * $wallet->getFeePercent() / 100);
39 39
 
40 40
             /**
41 41
              * Added minimum commission condition
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $wallet = $this->getWallet($object);
98 98
         $proxy = app(ProxyService::class);
99 99
         if (!$proxy->has($wallet->getKey())) {
100
-            $proxy->set($wallet->getKey(), (int)$wallet->getOriginal('balance', 0));
100
+            $proxy->set($wallet->getKey(), (int) $wallet->getOriginal('balance', 0));
101 101
         }
102 102
 
103 103
         return $proxy[$wallet->getKey()];
Please login to merge, or discard this patch.
src/Services/CommonService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@
 block discarded – undo
173 173
     public function assemble(array $brings): array
174 174
     {
175 175
         $self = $this;
176
-        return DB::transaction(static function () use ($self, $brings) {
176
+        return DB::transaction(static function() use ($self, $brings) {
177 177
             return $self->multiBrings($brings);
178 178
         });
179 179
     }
Please login to merge, or discard this patch.