Completed
Pull Request — master (#44)
by Бабичев
06:39
created
src/Traits/HasGift.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
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)
Please login to merge, or discard this patch.
src/Services/WalletService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Services/CommonService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function enforce(Wallet $self, array $transactions): array
49 49
     {
50
-        return DB::transaction(function () use ($self, $transactions) {
50
+        return DB::transaction(function() use ($self, $transactions) {
51 51
             return $this->multiOperation($self, $transactions);
52 52
         });
53 53
     }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public function assemble(array $brings): array
88 88
     {
89
-        return DB::transaction(function () use ($brings) {
89
+        return DB::transaction(function() use ($brings) {
90 90
             return $this->multiBrings($brings);
91 91
         });
92 92
     }
Please login to merge, or discard this patch.
src/Traits/HasWallet.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function deposit(int $amount, ?array $meta = null, bool $confirmed = true): Transaction
47 47
     {
48
-        return DB::transaction(function () use ($amount, $meta, $confirmed) {
48
+        return DB::transaction(function() use ($amount, $meta, $confirmed) {
49 49
             return app(CommonService::class)
50 50
                 ->deposit($this, $amount, $meta, $confirmed);
51 51
         });
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             $this->exists or $this->save();
82 82
             $proxy = app(ProxyService::class);
83 83
             if (!$proxy->has($this->getKey())) {
84
-                $proxy->set($this->getKey(), (int)($this->attributes['balance'] ?? 0));
84
+                $proxy->set($this->getKey(), (int) ($this->attributes['balance'] ?? 0));
85 85
             }
86 86
 
87 87
             return $proxy[$this->getKey()];
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      */
171 171
     public function forceWithdraw(int $amount, ?array $meta = null, bool $confirmed = true): Transaction
172 172
     {
173
-        return DB::transaction(function () use ($amount, $meta, $confirmed) {
173
+        return DB::transaction(function() use ($amount, $meta, $confirmed) {
174 174
             return app(CommonService::class)
175 175
                 ->forceWithdraw($this, $amount, $meta, $confirmed);
176 176
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
      */
189 189
     public function forceTransfer(Wallet $wallet, int $amount, ?array $meta = null): Transfer
190 190
     {
191
-        return DB::transaction(function () use ($amount, $wallet, $meta) {
191
+        return DB::transaction(function() use ($amount, $wallet, $meta) {
192 192
             return app(CommonService::class)
193 193
                 ->forceTransfer($this, $wallet, $amount, $meta);
194 194
         });
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
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
             throw new ProductEnded(trans('wallet::errors.product_stock'));
30 30
         }
31 31
 
32
-        return DB::transaction(function () use ($cart) {
32
+        return DB::transaction(function() use ($cart) {
33 33
             $results = [];
34 34
             foreach ($cart->getItems() as $product) {
35 35
                 $results[] = app(CommonService::class)->transfer(
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             throw new ProductEnded(trans('wallet::errors.product_stock'));
72 72
         }
73 73
 
74
-        return DB::transaction(function () use ($cart, $force) {
74
+        return DB::transaction(function() use ($cart, $force) {
75 75
 
76 76
             $results = [];
77 77
             foreach ($cart->getItems() as $product) {
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      */
136 136
     public function refundCart(Cart $cart, bool $force = null, bool $gifts = null): bool
137 137
     {
138
-        return DB::transaction(function () use ($cart, $force, $gifts) {
138
+        return DB::transaction(function() use ($cart, $force, $gifts) {
139 139
 
140 140
             $results = [];
141 141
             $transfers = $cart->hasPaid($this, $gifts);
Please login to merge, or discard this patch.