Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrutinizer Auto-Fixes #94

Merged
merged 1 commit into from
Aug 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/Traits/HasWalletFloat.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ trait HasWalletFloat
public function forceWithdrawFloat(float $amount, ?array $meta = null, bool $confirmed = true): Transaction
{
$decimalPlaces = app(WalletService::class)->decimalPlaces($this);
return $this->forceWithdraw((int)round($amount * $decimalPlaces), $meta, $confirmed);
return $this->forceWithdraw((int) round($amount * $decimalPlaces), $meta, $confirmed);
}

/**
Expand All @@ -41,7 +41,7 @@ public function forceWithdrawFloat(float $amount, ?array $meta = null, bool $con
public function depositFloat(float $amount, ?array $meta = null, bool $confirmed = true): Transaction
{
$decimalPlaces = app(WalletService::class)->decimalPlaces($this);
return $this->deposit((int)round($amount * $decimalPlaces), $meta, $confirmed);
return $this->deposit((int) round($amount * $decimalPlaces), $meta, $confirmed);
}

/**
Expand All @@ -54,7 +54,7 @@ public function depositFloat(float $amount, ?array $meta = null, bool $confirmed
public function withdrawFloat(float $amount, ?array $meta = null, bool $confirmed = true): Transaction
{
$decimalPlaces = app(WalletService::class)->decimalPlaces($this);
return $this->withdraw((int)round($amount * $decimalPlaces), $meta, $confirmed);
return $this->withdraw((int) round($amount * $decimalPlaces), $meta, $confirmed);
}

/**
Expand All @@ -64,7 +64,7 @@ public function withdrawFloat(float $amount, ?array $meta = null, bool $confirme
public function canWithdrawFloat(float $amount): bool
{
$decimalPlaces = app(WalletService::class)->decimalPlaces($this);
return $this->canWithdraw((int)round($amount * $decimalPlaces));
return $this->canWithdraw((int) round($amount * $decimalPlaces));
}

/**
Expand All @@ -77,7 +77,7 @@ public function canWithdrawFloat(float $amount): bool
public function transferFloat(Wallet $wallet, float $amount, ?array $meta = null): Transfer
{
$decimalPlaces = app(WalletService::class)->decimalPlaces($this);
return $this->transfer($wallet, (int)round($amount * $decimalPlaces), $meta);
return $this->transfer($wallet, (int) round($amount * $decimalPlaces), $meta);
}

/**
Expand All @@ -89,7 +89,7 @@ public function transferFloat(Wallet $wallet, float $amount, ?array $meta = null
public function safeTransferFloat(Wallet $wallet, float $amount, ?array $meta = null): ?Transfer
{
$decimalPlaces = app(WalletService::class)->decimalPlaces($this);
return $this->safeTransfer($wallet, (int)round($amount * $decimalPlaces), $meta);
return $this->safeTransfer($wallet, (int) round($amount * $decimalPlaces), $meta);
}

/**
Expand All @@ -101,7 +101,7 @@ public function safeTransferFloat(Wallet $wallet, float $amount, ?array $meta =
public function forceTransferFloat(Wallet $wallet, float $amount, ?array $meta = null): Transfer
{
$decimalPlaces = app(WalletService::class)->decimalPlaces($this);
return $this->forceTransfer($wallet, (int)round($amount * $decimalPlaces), $meta);
return $this->forceTransfer($wallet, (int) round($amount * $decimalPlaces), $meta);
}

/**
Expand Down