Passed
Pull Request — master (#9)
by Бабичев
02:39
created
src/Traits/CanBePaid.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
                 ->setModel($this->transfers()->getMorphClass());
69 69
         }
70 70
 
71
-        return DB::transaction(function () use ($product, $transfer) {
71
+        return DB::transaction(function() use ($product, $transfer) {
72 72
             $product->transfer($this, $product->getAmountProduct(), $product->getMetaProduct());
73 73
             return $transfer->update(['refund' => 1]);
74 74
         });
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
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public function transfer(Wallet $wallet, int $amount, ?array $meta = null): Transfer
101 101
     {
102
-        return DB::transaction(function () use ($amount, $wallet, $meta) {
102
+        return DB::transaction(function() use ($amount, $wallet, $meta) {
103 103
             $withdraw = $this->withdraw($amount, $meta);
104 104
             $deposit = $wallet->deposit($amount, $meta);
105 105
             return $this->assemble($wallet, $withdraw, $deposit);
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      */
130 130
     public function forceTransfer(Wallet $wallet, int $amount, ?array $meta = null): Transfer
131 131
     {
132
-        return DB::transaction(function () use ($amount, $wallet, $meta) {
132
+        return DB::transaction(function() use ($amount, $wallet, $meta) {
133 133
             $withdraw = $this->forceWithdraw($amount, $meta);
134 134
             $deposit = $wallet->deposit($amount, $meta);
135 135
             return $this->assemble($wallet, $withdraw, $deposit);
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
              */
239 239
             $collection = $this->getRelation('balance');
240 240
             $relation = $collection->first();
241
-            static::$cachedBalances[$this->getKey()] = (int)($relation->total ?? 0);
241
+            static::$cachedBalances[$this->getKey()] = (int) ($relation->total ?? 0);
242 242
         }
243 243
 
244 244
         return static::$cachedBalances[$this->getKey()];
Please login to merge, or discard this patch.