phpstan/phpstan-nette

PresenterClass::__construct() does not call parent constructor from Nette\Application\UI\Presenter

bazo opened this issue · 2 comments

bazo commented

I get an error for all presenters that they don't call parent constructor. why is this an error?

Because you should call the parent constructor. It's a matter of encapsulation - the parent object is only consistent when its constructor is called. It's weird to think when creating objects that someone can work around my constructor being called, leaving the object in potentially inconsistent state.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.