-
-
Notifications
You must be signed in to change notification settings - Fork 947
Spread param reference in conditional type #10529
Copy link
Copy link
Open
Labels
Description
Feature request
repro: https://phpstan.org/r/b0949748-1e0e-4b0c-b0ff-26ffab767ad9
The current PHPStan output is fine but $args in the condition type is misleading. PHPStan assumes there (in the conditional type) $args to be ...$args.
In real world, php runtime, $args is always an array.
This is a feature request to require ...$args to be referenced as ...$args in the conditional type, ie. referirng $args should emit regular non-existing parameter and ...$args should refer to what refer PHPStan refers currently.
Reactions are currently unavailable