Skip to content

Implement dynamic return type using phpstan conditional return types instead of phpstan extension #733

Description

@tacovandenbroek

Dynamic return typing was implemented using a phpstan extension (see: #94 for instance). Currently this could be implemented using "Conditional return types", like this: https://phpstan.org/r/97cd0a13-6c55-4473-ae96-5ac94807cbde

This prevents the need to use all phpstan rules from Safe (we do not want to migrate completely, yet), but still let phpstan know what the return types are.

Also, using native features is always preferable over extending imho 😉

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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