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

Open
wants to merge 1 commit into
base: 4.x
Choose a base branch
from

Conversation

axlon
Copy link

@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
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