You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
Currently when having something along:
The type of
$a
as shown in an IDE isstring
due to the type hints on thedefaultsTo
method.We should find a way to have IDEs show the correct type on
defaultsTo
(which is generic, as the return value ofdefaultsTo
depends on the type of the default value. The type is actuallya -> a
, but currently we type hinta -> String
).Maybe we can use this: https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Advanced+Metadata
The text was updated successfully, but these errors were encountered: