noverify icon indicating copy to clipboard operation
noverify copied to clipboard

Warn about excessive func args

Open quasilyte opened this issue 5 years ago • 1 comments

Code Example

stat($filename, $flags);

Actual Behavior

No warnings.

Expected Behavior

Warning about the extra (excessive) argument passed to stat (or any other) function.

Seems reasonable for functions that don't use func_get_args and are not variadic.

quasilyte avatar Jul 26 '19 10:07 quasilyte

Yeah, but you have to make sure that all the internal (and extension) functions are annotated as having variadic arguments. I think they do but it is worth checking that printf for example is defined as having variadic arguments.

YuriyNasretdinov avatar Jul 26 '19 11:07 YuriyNasretdinov