psalm
psalm copied to clipboard
TooManyArguments doesn't work for call_user_func
https://psalm.dev/r/a1d15398f9
Basics were implemented in https://github.com/vimeo/psalm/issues/726 though
I found these snippets:
https://psalm.dev/r/a1d15398f9
<?php
function foo(string $a) : void {}
foo("hello", 4);
call_user_func( 'foo', "hello", 4);
Psalm output (using commit 028ac7f):
ERROR: TooManyArguments - 5:1 - Too many arguments for foo - expecting 1 but saw 2
Turns out it's not only this issue but all issues that don't work - see https://github.com/vimeo/psalm/issues/10744