Skip to content

Hexadecimal is never an empty string #593

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 3 commits into from
May 26, 2025
Merged

Conversation

axlon
Copy link
Contributor

@axlon axlon commented Apr 2, 2025

Description

Similarly to UUIDs, a hexadecimal can never be empty, this PR documents it as such.

Motivation and context

More and more libraries are starting to enforce stricter typing, I was dealing with a library that required a non-empty-string which hexadecimal isn't (is, but isn't documented that it is) which requires either baselining false positives are adding redundant assertions.

How has this been tested?

This PR contains no functional changes, I've tested the changes through PHPStan.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

PR checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • I have added tests to cover my changes.

@axlon axlon requested a review from ramsey as a code owner April 2, 2025 08:56
Copy link

codecov bot commented May 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.16%. Comparing base (fd7c1c9) to head (d37b41c).
Report is 1 commits behind head on 4.x.

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##                4.x     #593   +/-   ##
=========================================
  Coverage     95.16%   95.16%           
  Complexity      584      584           
=========================================
  Files            70       70           
  Lines          1840     1840           
=========================================
  Hits           1751     1751           
  Misses           89       89           
Files with missing lines Coverage Δ
src/Type/Hexadecimal.php 92.00% <ø> (ø)

@ramsey ramsey merged commit c72360e into ramsey:4.x May 26, 2025
31 checks passed
@ramsey
Copy link
Owner

ramsey commented May 26, 2025

Thank you for contributing! 🎉

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.

2 participants