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
My code contains a simple $this->viewBuilder()->setClassName(null); in a controller to not render a view.
What happened
PHPStan emits an error Parameter #1 $name of method Cake\View\ViewBuilder::setClassName() expects string, null given.
What you expected to happen
No error to be emitted since the ViewBuilder->$_className is declared as @var string|null the docblock for ViewBuilder::setName($name) should be updated with @param string|null $name The name of the view.
The text was updated successfully, but these errors were encountered:
This is a (multiple allowed):
bug
enhancement
feature-discussion (RFC)
CakePHP Version: 3.6.14.
Platform and Target: PHP 7.2.12, PHPStan 0.10.6.
What you did
My code contains a simple
$this->viewBuilder()->setClassName(null);
in a controller to not render a view.What happened
PHPStan emits an error
Parameter #1 $name of method Cake\View\ViewBuilder::setClassName() expects string, null given.
What you expected to happen
No error to be emitted since the
ViewBuilder->$_className
is declared as@var string|null
the docblock forViewBuilder::setName($name)
should be updated with@param string|null $name The name of the view.
The text was updated successfully, but these errors were encountered: