Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Psalm does not respect named arguments #53

Closed
cawa-93 opened this issue Feb 15, 2024 · 0 comments
Closed

The Psalm does not respect named arguments #53

cawa-93 opened this issue Feb 15, 2024 · 0 comments

Comments

@cawa-93
Copy link

cawa-93 commented Feb 15, 2024

On this line of code:

add_action('init', [$this, 'registerPostType'], accepted_args: 0);

I got two warnings:

psalm: HookInvalidArgs: Hook "init" does not accept any args, but the default number of args of add_action is 1. Please pass 0 as 4th argument
psalm: InvalidNamedArgument: Parameter $accepted_args does not exist on function add_action
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant