vimeo/psalm

Improve support for is_file and family

Open

#7 770 ouverte le 10 mars 2022

Voir sur GitHub
 (13 commentaires) (0 réactions) (0 assignés)PHP (668 forks)batch import
Help wantedeasy problemsenhancementgood first issueinternal stubs/callmap

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

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

Guide contributeur