Skip to content

Commit

Permalink
Refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maikuolan committed Jun 26, 2024
1 parent c680810 commit 4f291d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![v1: PHP >= 5.4](https://img.shields.io/badge/v1-PHP%20%3E%3D%205.4-8892bf.svg)](https://maikuolan.github.io/Compatibility-Charts/)
[![v2: PHP >= 7.2](https://img.shields.io/badge/v2-PHP%20%3E%3D%207.2-8892bf.svg)](https://maikuolan.github.io/Compatibility-Charts/)
![v1: PHP >= 5.4 < 8.4](https://img.shields.io/badge/v1-PHP%20%3E%3D%205.4%20%3C%208.4-8892bf.svg)
![v2: PHP >= 7.2](https://img.shields.io/badge/v2-PHP%20%3E%3D%207.2-8892bf.svg)
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)

## Common Classes Package.
Expand Down Expand Up @@ -53,4 +53,4 @@ Please use the issues page of this repository.
---


Last Updated: 14 September 2023 (2023.09.14).
Last Updated: 31 May 2024 (2024.05.31).
3 changes: 1 addition & 2 deletions src/NumberFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -1302,8 +1302,7 @@ public function format($Number, int $Decimals = 0): string
} else {
$WholeLen = strlen($Number);
}
$OddEven = 'o';
for ($Unit = 0, $Formatted = '', $ThouPos = $this->GroupOffset, $Pos = $WholeLen - 1; $Pos > -1; $Pos--, $Unit++, $OddEven = $OddEven === 'o' ? 'e' : 'o') {
for ($OddEven = 'o', $Unit = 0, $Formatted = '', $ThouPos = $this->GroupOffset, $Pos = $WholeLen - 1; $Pos > -1; $Pos--, $Unit++, $OddEven = $OddEven === 'o' ? 'e' : 'o') {
if ($ThouPos >= $this->GroupSize) {
$ThouPos = 1;
$Formatted = $this->GroupSeparator . $Formatted;
Expand Down

0 comments on commit 4f291d0

Please sign in to comment.