Closed staabm closed 1 month ago
when using AccessoryTypes these need to be intersected with a main type
see e.g.
where you miss to intersect a AccessoryNonEmptyStringType with StringType
AccessoryNonEmptyStringType
StringType
not doing so lead to false positives like https://github.com/phpstan/phpstan/issues/11535#issuecomment-2377258037
in e.g.
https://github.com/jbboehr/phpstan-laravel-validation/blob/7e20c3ed96ae50feecff87049a7ef85ed01408f6/src/Validation/TypeResolver.php#L157-L160
its correctly done
I fixed it in my fork https://github.com/momala454/phpstan-laravel-validation
That was the subject of #9, I guess I missed a spot.
I cherry-picked @momala454's commits into master, should be fixed now. Thanks!
when using AccessoryTypes these need to be intersected with a main type
see e.g.
where you miss to intersect a
AccessoryNonEmptyStringType
withStringType
not doing so lead to false positives like https://github.com/phpstan/phpstan/issues/11535#issuecomment-2377258037
in e.g.
https://github.com/jbboehr/phpstan-laravel-validation/blob/7e20c3ed96ae50feecff87049a7ef85ed01408f6/src/Validation/TypeResolver.php#L157-L160
its correctly done