vimeo/psalm
View on GitHubEmit an issue when using coalesce operator if the first operand can't be null
Open
#7,101 opened on Dec 8, 2021
Help wantedenhancement
Repository metrics
- Stars
- (5,369 stars)
- PR merge metrics
- (Avg merge 3d 12h) (5 merged PRs in 30d)
Description
https://psalm.dev/r/154ffd42b2
/** @var string $q */
$a = explode(',', $q);
return $a[0] ?? '';
Should've resulted in TypeDoesNotContainNull but not.
Compare with: