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

Fix defaultValue type hints #15

Open
mpscholten opened this issue Jul 22, 2016 · 0 comments
Open

Fix defaultValue type hints #15

mpscholten opened this issue Jul 22, 2016 · 0 comments
Labels
Milestone

Comments

@mpscholten
Copy link
Owner

Currently when having something along:

$a = $this->param(...)->string()->defaultsTo(null);

The type of $a as shown in an IDE is string due to the type hints on the defaultsTo method.

We should find a way to have IDEs show the correct type on defaultsTo (which is generic, as the return value of defaultsTo depends on the type of the default value. The type is actually a -> a, but currently we type hint a -> String).

Maybe we can use this: https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Advanced+Metadata

@mpscholten mpscholten added the bug label Jul 25, 2016
@mpscholten mpscholten added this to the v1.4 milestone Aug 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant