Skip to content
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

Ability to provide a base number to be added to the counter #74

Merged
merged 6 commits into from
Sep 16, 2023

Conversation

Brikaa
Copy link
Contributor

@Brikaa Brikaa commented Sep 15, 2023

closes #64

public/index.php Outdated Show resolved Hide resolved
src/Request.php Outdated Show resolved Hide resolved
public/index.php Outdated Show resolved Hide resolved
src/BadgeImageRendererService.php Outdated Show resolved Hide resolved
@antonkomarev
Copy link
Owner

Thank you for the contribution!

public/index.php Outdated Show resolved Hide resolved
src/Count.php Outdated Show resolved Hide resolved
src/Count.php Outdated Show resolved Hide resolved
@Brikaa
Copy link
Contributor Author

Brikaa commented Sep 16, 2023

The values go a bit inaccurate after exceeding 10 ^ 16. That is a problem of number_format

src/Count.php Outdated Show resolved Hide resolved
@Brikaa
Copy link
Contributor Author

Brikaa commented Sep 16, 2023

@antonkomarev I added a negative count check in the constructor of Count. I did not remove the check from ofString since it checks for any non-digits.

@antonkomarev antonkomarev merged commit 97f5f82 into antonkomarev:master Sep 16, 2023
10 checks passed
@antonkomarev
Copy link
Owner

Looks good to me, thanks @Brikaa. Going to fine tune it later a bit and then release to prod.

@Brikaa Brikaa deleted the add-initial-value-to-counter branch September 16, 2023 17:48
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.

How to set the initial value
2 participants