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

Enhancement: Allow creating Major, Minor, and Patch from int #10

Merged
merged 1 commit into from
Dec 25, 2023

Conversation

localheinz
Copy link
Member

This pull request

  • allows creating Major, Minor, and Patch from int

Related to #7.

Copy link

codecov bot commented Dec 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2f8d58c) 100.00% compared to head (eda1816) 100.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##                main       #10   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity        47        59   +12     
===========================================
  Files             12        12           
  Lines            119       152   +33     
===========================================
+ Hits             119       152   +33     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@localheinz localheinz merged commit 0bff890 into main Dec 25, 2023
20 checks passed
@localheinz localheinz deleted the feature/int branch December 25, 2023 15:17
@@ -34,14 +46,19 @@ public static function fromString(string $value): self
throw Exception\InvalidMajor::fromString($value);
}

return new self($value);
return new self((int) $value);
Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like this can be a problem when $value is greater than PHP_INT_MAX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants