Skip to content

Commit

Permalink
remove the redundant check
Browse files Browse the repository at this point in the history
  • Loading branch information
514sid committed Aug 14, 2023
1 parent 00d967a commit e04f0dd
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/DecimalSeparatorGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ public static function guess(string $value): DecimalSeparator
return self::selectDecimalSeparator(!$canBeInteger, DecimalSeparator::COMMA, DecimalSeparator::POINT);
}

// If commas are fewer than points, use comma as separator
if ($commaCount < $pointCount) {
return DecimalSeparator::COMMA;
}

// Choose separator based on the last occurrence of each separator
return self::selectDecimalSeparator(
self::lastPosition($value, DecimalSeparator::POINT) > self::lastPosition($value, DecimalSeparator::COMMA),
Expand Down

0 comments on commit e04f0dd

Please sign in to comment.