Skip to content

Spread param reference in conditional type #10529

@mvorisek

Description

@mvorisek

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions