Skip to content

Commit

Permalink
Exchange.php left ←→ right in if-clauses ccxt#5263 ccxt#5246
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Jun 8, 2019
1 parent 916f227 commit e5c7f74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions php/Exchange.php
Expand Up @@ -2270,7 +2270,7 @@ public static function decimalToPrecision($x, $roundingMode = ROUND, $numPrecisi
}

public static function decimal_to_precision($x, $roundingMode = ROUND, $numPrecisionDigits = null, $countingMode = DECIMAL_PLACES, $paddingMode = NO_PADDING) {
if (TICK_SIZE === $countingMode) {
if ($countingMode === TICK_SIZE) {
if (!(is_float ($numPrecisionDigits) || is_int($numPrecisionDigits)))
throw new BaseError('Precision must be an integer or float for TICK_SIZE');
} else {
Expand All @@ -2289,7 +2289,7 @@ public static function decimal_to_precision($x, $roundingMode = ROUND, $numPreci

// Special handling for negative precision
if ($numPrecisionDigits < 0) {
if (TICK_SIZE === $countingMode) {
if ($countingMode === TICK_SIZE) {
throw new BaseError ('TICK_SIZE cant be used with negative numPrecisionDigits');
}
$toNearest = pow(10, abs($numPrecisionDigits));
Expand Down

0 comments on commit e5c7f74

Please sign in to comment.