Skip to content

Feature request: public-method-string<O> #2500

@lstrojny

Description

@lstrojny

Could something like this be achieved?

/**
  * @template O of object
  * @psalm-param O $object
  * @psalm-param method-name<O> $method
  */
function invoke($object, $method) {
    $object->$method();
}

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