If function has more than 10 parameters, there is no Warning nor Error if function is called with less than required parameters

Gist - https://gist.github.com/dpeca/64f0aab9a10ccd88c9a52d0be421ebef

So, if function has 10 or less parameters - PHPStorm will regularly show error "Required parameter $par2 is missing" - and that's expected.

But......

If function has 11 parameters:

Absolutely no error, no warning... and I'm just left blind without static analysis that should warn me that i'm calling function with less than required parameters.

Why?

Let's say this is ORM class, and my database table has 10 fields, so, obviously I must create insert() function for all 10 fields, in this case 10 parameters of insert() function.
Let's say I call insert() function from many different PHP scripts...
Then one day I decide to add one more field to my table, so insert() function will receive 11 parameters then.
Then I change my code to call insert() functions with 11 parameters... but since it's used on many places... I expect PHPStorm will hint me where I'm still using it with 10 parameters... I mean... that's why we use static analysis... but instead of it - I will be just left without any warning about missing paremeter...

BTW, I'm using latest version of PHPStorm, 2019.1.3, on Win10

1

请先登录再写评论。