0
 Line   base\Kader\Kader.php (in context of class Kader\Debugging)                    
 ------ ------------------------------------------------------------------------------ 
 107    Method Kader\Debugging::configDebug() invoked with 0 parameters, 2 required.  
 ------ ------------------------------------------------------------------------------ 

 [ERROR] Found 1 error 

Kader.php has this line

$this->configDebug();

Which calls:

public function configDebug($action = 'start', $options = []) {

I'm wondering why PHPStan can't see that the function clearly has default arguments and thus doesn't require it to be called with two parameters?

1 Answers1

0

PHPStan probably sees a different declaration of the same class and method you might also have in the project.

It’d be helpful if you tried to reproduce the problem in a small public repository, and reported that on PHPStan’s GitHub issue tracker. Thank you.

Ondřej Mirtes
  • 5,054
  • 25
  • 36