Skip to content

♻️ float no more #997

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 21, 2025
Merged

♻️ float no more #997

merged 1 commit into from
Jan 21, 2025

Conversation

willpower232
Copy link
Contributor

phpstan was annoyed about using a float in the substr, past you had cast it to int at the end, I thought it was slightly less messy to cast the result of ceil as that is where the float is introduced for some reason known only to the developers of PHP.

Co-authored-by: erikn69 <[email protected]>
@willpower232 willpower232 requested a review from erikn69 January 18, 2025 17:06
@willpower232 willpower232 self-assigned this Jan 18, 2025
@parallels999
Copy link
Contributor

https://www.php.net/manual/es/function.ceil.php

The return value of ceil() is still of type float as the value range of float is usually bigger than that of int.

@erikn69 erikn69 merged commit 2a5b584 into master Jan 21, 2025
17 checks passed
@erikn69 erikn69 deleted the float-no-more branch January 21, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants