Skip to content

Type annotations misinterpreted by phpstan #102

Description

@christiaan

When using this library in a project which uses phpstan for code analysis it gives the following error.

Call to method then() on an unknown class     
React\Socket\React\Promise\PromiseInterface. 

This happens because of the following return type @return React\Promise\PromiseInterface of ConnectorInterface#connect

Since the file is namespaced it expects all types to either be relative to the file namespace or to start with a \ if you want a fully qualified name.

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