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
$this->redirect('Home:'); // this is OK
$this->redirect('Home:', ['name' => 'test']); // there is the phpstan error
$this->redirect(200, 'Home:', ['name' => 'test']); // first parameter $code is deprecated; use redirectPermanent() for 301 redirect.
Expected Behavior
there should not be phpstan errors
Possible Solution
Fix type hints for $destination parameter to string|array|null.
or
Remove $code parameter from method completely. Dont know if there is any usage of it.
The text was updated successfully, but these errors were encountered:
Version: 3.0.0
Bug Description
Getting phpstan lvl5 error on
$this->redirect('Home:', ['name' => 'test']);
-Parameter #2 $destination of method Nette\Application\UI\Component::redirect() expects string|null, array<string, string> given.
Steps To Reproduce
Expected Behavior
Possible Solution
string|array|null
.or
$code
parameter from method completely. Dont know if there is any usage of it.The text was updated successfully, but these errors were encountered: