You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry if this is very basic question. I only recently started using phpstan and I came across this rule. I don't understand what is the proper way to do this? Why is a constructor parameter with default value bad?
I tried to research this, but I could not find anything..
Excerpt from my code that triggers this rule:
final class Client
{
public function __construct(
protected string $endpoint,
protected string $access_key,
protected string $secret_key,
protected int $timeout = 10,
protected null|int $retryTimes = null,
protected null|int $retryMilliseconds = null,
) {
}
The text was updated successfully, but these errors were encountered:
Hi,
Sorry if this is very basic question. I only recently started using phpstan and I came across this rule. I don't understand what is the proper way to do this? Why is a constructor parameter with default value bad?
I tried to research this, but I could not find anything..
Excerpt from my code that triggers this rule:
The text was updated successfully, but these errors were encountered: