Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/master' into lock
Browse files Browse the repository at this point in the history
  • Loading branch information
Babichev Maxim committed Aug 10, 2019
2 parents 8c7b089 + ef7135e commit 192ea4c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .scrutinizer.yml
Expand Up @@ -41,3 +41,9 @@ checks:
fix_line_ending: true
fix_identation_4spaces: true
fix_doc_comments: true

coding_style:
php:
spaces:
before_parentheses:
closure_definition: true
14 changes: 7 additions & 7 deletions src/Traits/HasWalletFloat.php
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

0 comments on commit 192ea4c

Please sign in to comment.