Completed
Push — master ( 831ccc...fee157 )
by Бабичев
03:22
created
src/Tax.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 static 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/WalletProxy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      */
26 26
     public static function get(int $key): int
27 27
     {
28
-        return (int)(static::$rows[$key] ?? 0);
28
+        return (int) (static::$rows[$key] ?? 0);
29 29
     }
30 30
 
31 31
     /**
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
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     public function transfer(Wallet $wallet, int $amount, ?array $meta = null): Transfer
119 119
     {
120
-        return DB::transaction(function () use ($amount, $wallet, $meta) {
120
+        return DB::transaction(function() use ($amount, $wallet, $meta) {
121 121
             $fee = Tax::fee($wallet, $amount);
122 122
             $withdraw = $this->withdraw($amount + $fee, $meta);
123 123
             $deposit = $wallet->deposit($amount, $meta);
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
      */
154 154
     public function forceTransfer(Wallet $wallet, int $amount, ?array $meta = null): Transfer
155 155
     {
156
-        return DB::transaction(function () use ($amount, $wallet, $meta) {
156
+        return DB::transaction(function() use ($amount, $wallet, $meta) {
157 157
             $fee = Tax::fee($wallet, $amount);
158 158
             $withdraw = $this->forceWithdraw($amount + $fee, $meta);
159 159
             $deposit = $wallet->deposit($amount, $meta);
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
      */
200 200
     protected function change(string $type, int $amount, ?array $meta, bool $confirmed): Transaction
201 201
     {
202
-        return DB::transaction(function () use ($type, $amount, $meta, $confirmed) {
202
+        return DB::transaction(function() use ($type, $amount, $meta, $confirmed) {
203 203
 
204 204
             $wallet = $this;
205 205
             if (!($this instanceof WalletModel)) {
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
         if ($this instanceof WalletModel) {
291 291
             $this->exists or $this->save();
292 292
             if (!WalletProxy::has($this->getKey())) {
293
-                WalletProxy::set($this->getKey(), (int)($this->attributes['balance'] ?? 0));
293
+                WalletProxy::set($this->getKey(), (int) ($this->attributes['balance'] ?? 0));
294 294
             }
295 295
 
296 296
             return WalletProxy::get($this->getKey());
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
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
          * this comment is needed for syntax highlighting )
33 33
          * @var \Bavix\Wallet\Models\Wallet $to
34 34
          */
35
-        return DB::transaction(function () use ($to, $product) {
35
+        return DB::transaction(function() use ($to, $product) {
36 36
             $amount = $product->getAmountProduct();
37 37
             $meta = $product->getMetaProduct();
38 38
             $fee = Tax::fee($product, $amount);
Please login to merge, or discard this patch.
src/Traits/CanBePaid.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
                 ->setModel($this->transfers()->getMorphClass());
112 112
         }
113 113
 
114
-        return DB::transaction(function () use ($product, $transfer, $force) {
114
+        return DB::transaction(function() use ($product, $transfer, $force) {
115 115
             $transfer->load('withdraw.payable');
116 116
 
117 117
             if ($force) {
Please login to merge, or discard this patch.