Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type annotations misinterpreted by phpstan #102

Closed
christiaan opened this issue May 15, 2017 · 0 comments
Closed

Type annotations misinterpreted by phpstan #102

christiaan opened this issue May 15, 2017 · 0 comments

Comments

@christiaan
Copy link
Contributor

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.

christiaan added a commit to christiaan/socket that referenced this issue May 15, 2017
Fixes reactphp#102 Type annotations misinterpreted by phpstan

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant