Open sandeshjangam opened 1 year ago
@lorisleiva I am open to creating a PR. A little head start will be good...
I don’t think that this can be achieved in this package due to the dynamic nature of the package.
Did you try the ide-helper package yet?
I don’t think that this can be achieved in this package due to the dynamic nature of the package.
Did you try the ide-helper package yet?
Nope, I haven't yet. I am not sure how the ide-helper package will help to get it compatible with Larstan(PHPStan)?
Can you please elaborate?
@sandeshjangam The ide-helper package generates docblocks (or other files/annotations) based on your actual code which phpStan can use to understand your code better.
For example, it might add a docblock bit which can tell phpStan the arguments for UpdateUserPassword::run()
There's an extension for ide-helper just for laravel-actions which might help:
I think this is possible with generics, yes? Would really like to have this since everything getting set to "mixed" isn't terribly helpful.
This topic definitely needs more love.
It doesn't throw errors in PHPStan if args type, numbers etc. mismatches...
If I use this - UpdateUserPassword::make()->handle($user, 'secret') Larstan properly check args type, count etc
For this - UpdateUserPassword::run($user, 'secret') Larstand doesn't trigger any error
How can I add support to this? I am open to creating a PR. A little head start will be good...