Invalid number of parameters

I have been unable to find where to turn off this message. Does anybody know how?

9 comments
Comment actions Permalink

In what context? JS? PHP?

0
Comment actions Permalink

I'm using PhpStorm to edit Javascript. I'm trying to turn off the warning for javascript.

0
Comment actions Permalink

I'm using PhpStorm to edit Javascript. I'm trying to turn off the warning for javascript.

0
Comment actions Permalink

Please provide some code snippet demonstrating the problem, as our analyzer is being enhanced for handling more cases when parameters are optional
(and this http://youtrack.jetbrains.net/issue/IDEA-75417 is known problem we are aware of).
You can switch the validation off as described in http://youtrack.jetbrains.net/issue/WI-7675#comment=27-251988

0
Comment actions Permalink

the forum link you posted describes the same problem i am having. any javascipt function i create and then call without passing all the parameters (which i do a lot because i usually have default parameters), i get the warning.  i was hoping to be able to turn off this specific warning.

0
Comment actions Permalink

JavaScript analyzer knows about 'param = param | | "";' meaning optional parameter so I asked for valid snippet to fix analyzer.
Btw, what is PS / WS version you are using ?

0
Comment actions Permalink

i was using a different syntax for specifying optional parameters than what you posted in your last message. i converted my code to the syntax you showed and now everything is working perfectly.

i am using version 2.1.5 of PS.

thanks for your help!

0
Comment actions Permalink

Using WebStorm WS-110.518 with dojo framework.

I get "invalid number of parameters, expected 4"

    doh.robot.keyPress('c', 100, {'shift':false, 'ctrl':true, 'alt':false});


Method signature:
keyPress: function(/*Integer*/ charOrCode, /*Integer, optional*/ delay, /*Object*/ modifiers, /*Boolean*/ asynchronous){


Every dojo method is showing up with an invalid number of parameters message, which makes it hard to read.

Is there something I can do to prevent this error from showing up?
WebStorm is warning me about something that isn't broken.

Attachment(s):
2011-12-08_134922.png
2011-12-08_134847.png
0
Comment actions Permalink

We do not support inline optionality (",optional"), as well as nonoptional parameters after optional one. Please submit YouTrack ticket

0

Please sign in to leave a comment.