-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
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