Skip to content

Conversation

@staabm
Copy link
Contributor

@staabm staabm commented Feb 3, 2026

@staabm staabm marked this pull request as ready for review February 3, 2026 16:38
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@staabm
Copy link
Contributor Author

staabm commented Feb 3, 2026

@VincentLanglet would love your feedback, as you implemented lowser/upper case handling IIRC

{
if (strtolower($s) === 'hallo') {
assertType('non-falsy-string', $s);
assertType('lowercase-string&non-falsy-string', $s);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is wrong, it's not because strtolower($s) is a lowerstring than $s is a lowercase string.

It's only the case if $s === strtolower($something)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you are right. I mixed up the operands 🫣

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.

non-empty-string swallows other accessory string types if narrowed first

3 participants