It seems like you call parent on a different method (registerPolicies() instead of boot()). Are you sure this is correct? If so, you might want to change this to $this->registerPolicies().
This check looks for a call to a parent method whose name is different than
the method from which it is called.
The call to AuthServiceProvider::registerPolicies() has too many arguments starting with $gate.
This check compares calls to functions or methods with their respective definitions.
If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the
check may pick up the wrong definition and report false positives. One codebase
where this has been known to happen is Wordpress.
In this case you can add the @ignorePhpDoc
annotation to the duplicate definition and it will be ignored.
The method shouldUse does only exist in Illuminate\Contracts\Auth\Factory, but not in Illuminate\Contracts\Auth\Guard.
It seems like the method you are trying to call exists only in some of the
possible types.
Let’s take a look at an example:
classA{publicfunctionfoo(){}}classBextendsA{publicfunctionbar(){}}/** * @param A|B $x */functionsomeFunction($x){$x->foo();// This call is fine as the method exists in A and B.$x->bar();// This method only exists in B and might cause an error.}
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.