Skip to content

How phpstan detects real types of variables and method calls, especially case when trait is used #3574

@LoopKarma

Description

@LoopKarma

Support question

Hello, thank you for the great tool! I have a question how phpstan detects real types of variables.
In my codebase I have several classes with trait usage and I want to detect that trait method calls are related to the different namespace of trait and not to original class. Is it possible to use phpstan in my php code? Maybe you can provide some examples how it's working internally or how I can integrate with phpstan. Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions