vimeo/psalm
Auf GitHub ansehenInfer class type based upon result of is_a() function call
Open
#3.629 geöffnet am 22. Juni 2020
Help wantedenhancement
Repository-Metriken
- Stars
- (5.369 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 3T 12h) (5 gemergte PRs in 30 T)
Beschreibung
https://psalm.dev/r/8a00f9319d
I believe psalm should be able to infer that future calls to \Storage should resolve to \Illuminate\Support\Facades\Storage.
This is laravel's technique for aliasing classes.
If you'd like to provide some notes on how to implement, I'd be happy to take a stab. I'm not sure if the class should just be aliased in the scope of the is_a branch, or across the entire project. I'm thinking it might just need to be within the scope of the conditional