Hi,
This issue is probably equal to the one in #228.
I'm getting the error message "Expected 2 arguments. Found 1.intelephense(10005)" on user_error, even though it has 1 required and 1 optional argument. It seems to work as expected for trigger_error, which is what user_error is an alias for. But to rename all user_error to trigger_error just to satisfy intelephense seems silly.
Yes, 2nd parameter is optional but no default value is defined:
https://github.com/JetBrains/phpstorm-stubs/blob/master/Core/Core.php#L609
Feel free to submit a PR to the phpstorm-stubs repo :)
Most helpful comment
done, https://github.com/JetBrains/phpstorm-stubs/pull/556