Skip to content

Conversation

@aivchen
Copy link
Contributor

@aivchen aivchen commented May 8, 2025

Copy link
Member

@ondrejmirtes ondrejmirtes left a comment

Choose a reason for hiding this comment

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

Instead of this approach, please explore modifying IntersectionType::isNonEmptyString() based on $this->isString()->yes() and $this->isCallable()->yes(). Thanks.

@aivchen aivchen marked this pull request as draft May 8, 2025 12:18
@staabm
Copy link
Contributor

staabm commented May 10, 2025

might also be worth checking whether we have a similar problem with callable-array and non-empty-array

@aivchen aivchen force-pushed the callable-string-non-empty branch from 4196540 to b5af16b Compare May 11, 2025 15:19
@aivchen
Copy link
Contributor Author

aivchen commented May 11, 2025

Instead of this approach, please explore modifying IntersectionType::isNonEmptyString() based on $this->isString()->yes() and $this->isCallable()->yes(). Thanks.

@ondrejmirtes I tried to implement your suggestion. Have a look please.

@aivchen aivchen marked this pull request as ready for review May 11, 2025 15:25
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@aivchen
Copy link
Contributor Author

aivchen commented May 11, 2025

might also be worth checking whether we have a similar problem with callable-array and non-empty-array

Let's do it in another issue, please. As I see the logic for arrays is completely different.

@aivchen aivchen requested a review from ondrejmirtes May 11, 2025 15:29
@ondrejmirtes ondrejmirtes merged commit a12642a into phpstan:1.12.x May 13, 2025
310 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

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

Labels

None yet

4 participants