vimeo/psalm

Improve support for is_file and family

Open

#7.770 geöffnet am 10. März 2022

Auf GitHub ansehen
 (13 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)PHP (668 Forks)batch import
Help wantedeasy problemsenhancementgood first issueinternal stubs/callmap

Repository-Metriken

Stars
 (5.369 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 3T 12h) (5 gemergte PRs in 30 T)

Beschreibung

Hi,

The functions that expect a valid path (file_exists, is_readable, ...) always return false when an empty string is provided ( https://3v4l.org/TcecN ). So when those functions return true we can say that the argument is a non-empty string.

If my assumption is right it could help with situations like this: https://psalm.dev/r/26f209fe21

Contributor Guide