Completed
Pull Request — master (#40)
by Бабичев
03:53
created
src/WalletServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
         }
26 26
 
27 27
         $this->loadMigrationsFrom([
28
-            __DIR__.'/../database/migrations_v1',
29
-            __DIR__.'/../database/migrations_v2',
28
+            __DIR__ . '/../database/migrations_v1',
29
+            __DIR__ . '/../database/migrations_v2',
30 30
         ]);
31 31
 
32 32
         if (\function_exists('config_path')) {
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/Traits/HasWallet.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             $this->exists or $this->save();
95 95
             $proxy = \app(ProxyService::class);
96 96
             if (!$proxy->has($this->getKey())) {
97
-                $proxy->set($this->getKey(), (int)($this->attributes['balance'] ?? 0));
97
+                $proxy->set($this->getKey(), (int) ($this->attributes['balance'] ?? 0));
98 98
             }
99 99
 
100 100
             return $proxy[$this->getKey()];
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     public function transfer(Wallet $wallet, int $amount, ?array $meta = null, string $status = Transfer::STATUS_TRANSFER): Transfer
146 146
     {
147
-        return DB::transaction(function () use ($amount, $wallet, $meta, $status) {
147
+        return DB::transaction(function() use ($amount, $wallet, $meta, $status) {
148 148
             $fee = \app(WalletService::class)
149 149
                 ->fee($wallet, $amount);
150 150
 
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
      */
261 261
     public function forceTransfer(Wallet $wallet, int $amount, ?array $meta = null, string $status = Transfer::STATUS_TRANSFER): Transfer
262 262
     {
263
-        return DB::transaction(function () use ($amount, $wallet, $meta, $status) {
263
+        return DB::transaction(function() use ($amount, $wallet, $meta, $status) {
264 264
             $fee = \app(WalletService::class)
265 265
                 ->fee($wallet, $amount);
266 266
 
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
@@ -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/Traits/CartPay.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
                     ->setModel($this->transfers()->getMorphClass());
133 133
             }
134 134
 
135
-            $results = $results && DB::transaction(function () use ($product, $transfer, $force) {
135
+            $results = $results && DB::transaction(function() use ($product, $transfer, $force) {
136 136
                 $transfer->load('withdraw.wallet');
137 137
 
138 138
                 if ($force) {
Please login to merge, or discard this patch.