Why code inspector wants 3 parameters when the javascript function declaration has only 2

In PhpStorm 7, I have a javascript application using angularjs and angular-route libraries. The libraries are downloaded locally in PHPStorm for code inspection hinting. In my application there is code:

angular.module('app', ['ng-route', 'MyApp']).
config(function ($routeProvider) {
  $routeProvider.when('/start', {
    templateUrl: 'partials/start.html'
  });
  ....
);


The third line contains function call $routeProvider.when and "when" is underlined by PHPStorm inspector with warning about incorrect number of parameters. Inspector claims there should be 3 parameters. When I type Ctrl-B which goes to this function declaration, the declaration is as follows:

this.when = function(path, route) {
...


So there are 2 parameters. Also, the preceding phpdoc has two @param items. My question is, why does the inspector think that there should be 3 parameters and what can be done to improve it? By the way when I tested the same project in PHPStorm 10, there was no such problem. But my current version is 7, so I'd like to know how to deal with it in 7.

1 comment
Comment actions Permalink

the only solutuion for version 7 is disabling the inspection (Alt+click on 'when', hit Right, choose to disable the inspection)

0

Please sign in to leave a comment.