Hello,
I’m using sonarqube 9.9.3 also tested with 10.7
Using self hosted sonarqube
I have php file with class with extended, Below is example of it.
Here I’m not getting php:s100 error for function name.
It works if class is not extended.
class test extends someModel
{
public function some_method()
{
return true;
}
}
This rule has a failsafe mechanism: if the analyzer cannot resolve the parent class, it cannot be sure if the method is overridden or not. To avoid a FP in case it is overridden, the analyzer doesn’t check its naming.
In your case, AFAIU, the Authenticatable parent class comes from Laravel. Unfortunately, the analyzer cannot resolve a class from a dependency, unless the sources are also present in the project.
To sum up, this behavior is expected considering the limitations of the analyzer.
Unfortunately, there is no workaround. I created a ticket and you can monitor progress on it, but since it would be a major feature, we don’t plan to implement it in the nearest sprints.