Skip to content

[CLEANUP] Use number_format() in Size::render() - #1657

Merged
oliverklee merged 1 commit into
mainfrom
cleanup/size-render
Oct 22, 2026
Merged

oliverklee merged 1 commit into
mainfrom
cleanup/size-render

Conversation

@JakeQZ

@JakeQZ JakeQZ commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

This avoids the code having to be locale-aware, but doesn't simplify it much since number_format() has limited functionality.

Also add additional test for a very small number, and a note that there seems to be a PHP bug in which the behaviour of number_format() is affected by the locale setting on some systems, even though it should not be.

Closes #1653.

This avoids the code having to be locale-aware, but doesn't simplify it much
since `number_format()` has limited functionality.

Also add additional test for a very small number, and a note that there seems
to be a PHP bug in which the behaviour of `number_format()` is affected by the
locale setting on some systems, even though it should not be.

Closes #1653.
@JakeQZ
JakeQZ requested a review from oliverklee October 22, 2026 00:16
@JakeQZ JakeQZ self-assigned this Oct 22, 2026
@JakeQZ JakeQZ added cleanup refactor For PRs that refactor code without changing functionality labels Oct 22, 2026
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 75.43% (+0.001%) from 75.429% — cleanup/size-render into main

@oliverklee oliverklee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

@oliverklee
oliverklee merged commit 0c2b3a6 into main Oct 22, 2026
26 checks passed
@oliverklee
oliverklee deleted the cleanup/size-render branch October 22, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup refactor For PRs that refactor code without changing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use number_format for formatting sizes in Size::render() to avoid locale-specific decimal points

3 participants