@@ -105,7 +105,7 @@ |
||
| 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 | } |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | public function lock($self, string $name, \Closure $closure) |
| 21 | 21 | { |
| 22 | - return $this->lockProvider($self, $name, (int)config('wallet.lock.seconds')) |
|
| 22 | + return $this->lockProvider($self, $name, (int) config('wallet.lock.seconds')) |
|
| 23 | 23 | ->get($this->bindTo($self, $closure)); |
| 24 | 24 | } |
| 25 | 25 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | public function forceWithdrawFloat(float $amount, ?array $meta = null, bool $confirmed = true): Transaction |
| 29 | 29 | { |
| 30 | 30 | $decimalPlaces = app(WalletService::class)->decimalPlaces($this); |
| 31 | - return $this->forceWithdraw((int)round($amount * $decimalPlaces), $meta, $confirmed); |
|
| 31 | + return $this->forceWithdraw((int) round($amount * $decimalPlaces), $meta, $confirmed); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | public function depositFloat(float $amount, ?array $meta = null, bool $confirmed = true): Transaction |
| 42 | 42 | { |
| 43 | 43 | $decimalPlaces = app(WalletService::class)->decimalPlaces($this); |
| 44 | - return $this->deposit((int)round($amount * $decimalPlaces), $meta, $confirmed); |
|
| 44 | + return $this->deposit((int) round($amount * $decimalPlaces), $meta, $confirmed); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /** |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | public function withdrawFloat(float $amount, ?array $meta = null, bool $confirmed = true): Transaction |
| 55 | 55 | { |
| 56 | 56 | $decimalPlaces = app(WalletService::class)->decimalPlaces($this); |
| 57 | - return $this->withdraw((int)round($amount * $decimalPlaces), $meta, $confirmed); |
|
| 57 | + return $this->withdraw((int) round($amount * $decimalPlaces), $meta, $confirmed); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /** |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | public function canWithdrawFloat(float $amount): bool |
| 65 | 65 | { |
| 66 | 66 | $decimalPlaces = app(WalletService::class)->decimalPlaces($this); |
| 67 | - return $this->canWithdraw((int)round($amount * $decimalPlaces)); |
|
| 67 | + return $this->canWithdraw((int) round($amount * $decimalPlaces)); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | /** |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | public function transferFloat(Wallet $wallet, float $amount, ?array $meta = null): Transfer |
| 78 | 78 | { |
| 79 | 79 | $decimalPlaces = app(WalletService::class)->decimalPlaces($this); |
| 80 | - return $this->transfer($wallet, (int)round($amount * $decimalPlaces), $meta); |
|
| 80 | + return $this->transfer($wallet, (int) round($amount * $decimalPlaces), $meta); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /** |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | public function safeTransferFloat(Wallet $wallet, float $amount, ?array $meta = null): ?Transfer |
| 90 | 90 | { |
| 91 | 91 | $decimalPlaces = app(WalletService::class)->decimalPlaces($this); |
| 92 | - return $this->safeTransfer($wallet, (int)round($amount * $decimalPlaces), $meta); |
|
| 92 | + return $this->safeTransfer($wallet, (int) round($amount * $decimalPlaces), $meta); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | /** |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | public function forceTransferFloat(Wallet $wallet, float $amount, ?array $meta = null): Transfer |
| 102 | 102 | { |
| 103 | 103 | $decimalPlaces = app(WalletService::class)->decimalPlaces($this); |
| 104 | - return $this->forceTransfer($wallet, (int)round($amount * $decimalPlaces), $meta); |
|
| 104 | + return $this->forceTransfer($wallet, (int) round($amount * $decimalPlaces), $meta); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | { |
| 35 | 35 | $fee = 0; |
| 36 | 36 | if ($wallet instanceof Taxable) { |
| 37 | - $fee = (int)($amount * $wallet->getFeePercent() / 100); |
|
| 37 | + $fee = (int) ($amount * $wallet->getFeePercent() / 100); |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /** |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $wallet = $this->getWallet($object); |
| 101 | 101 | $proxy = app(ProxyService::class); |
| 102 | 102 | if (!$proxy->has($wallet->getKey())) { |
| 103 | - $proxy->set($wallet->getKey(), (int)$wallet->getOriginal('balance', 0)); |
|
| 103 | + $proxy->set($wallet->getKey(), (int) $wallet->getOriginal('balance', 0)); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | return $proxy[$wallet->getKey()]; |