vimeo/psalm

Emit an issue when using coalesce operator if the first operand can't be null

Open

#7 101 ouverte le 8 déc. 2021

Voir sur GitHub
 (10 commentaires) (0 réactions) (0 assignés)PHP (668 forks)batch import
Help wantedenhancement

Métriques du dépôt

Stars
 (5 369 stars)
Métriques de merge PR
 (Merge moyen 3j 12h) (5 PRs mergées en 30 j)

Description

https://psalm.dev/r/154ffd42b2

/** @var string $q */
$a = explode(',', $q);

return $a[0] ?? '';

Should've resulted in TypeDoesNotContainNull but not.

Compare with:

https://3v4l.org/pgbW6

Guide contributeur