vimeo/psalm
GitHub で見るInfer class type based upon result of is_a() function call
Open
#3,629 opened on 2020年6月22日
Help wantedenhancement
Repository metrics
- Stars
- (5,369 stars)
- PR merge metrics
- (平均マージ 3d 12h) (30d で 5 merged PRs)
説明
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