Replies: 1 comment
-
The A |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When you use variadic arguments with named arguments, the argument value can be a list or an associative array (a map).
Thanks to the
@no-named-argument
annotation, I can express that a list is expected: https://psalm.dev/r/0bcbce94a6The question is to do the opposite: How can I specify that the named arguments must be used?
Exhaustive examples of calling a variadic function
List
Map
Mix list and map
named argument before positional argument not supported
Array unpacking allows to use invalid names
But order have to be respected
Numeric name cannot be used with named arguments
Beta Was this translation helpful? Give feedback.
All reactions