user8863243
user8863243

Reputation:

Invalid number of arguments PhpStorm

I have a little problem with PhpStorm 2017. I get this error message even if my code is working properly:

enter image description here

I don't know how to deactivate this message. Thank you for your help.

Upvotes: 5

Views: 6034

Answers (2)

WHY
WHY

Reputation: 278

I used jQuery instead of $ as the warning keep showing.

"jQuery" instead of "$"

Upvotes: 4

bassxzero
bassxzero

Reputation: 5041

Try adding jquery as a library in your project. File -> Settings -> Languages & Frameworks -> JavaScript -> Libraries then enable the global jQuery. You might need to restart your IDE.

If that doesn't work you can use the "on" syntax to add the click event handler. http://api.jquery.com/on/

E.G

$('#cookie_btn').click(function (){})

Becomes

$('#cookie_btn').on('click',function (){})

Upvotes: 8

Related Questions