-
- Notifications
You must be signed in to change notification settings - Fork 116
Closed
Description
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
$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
$codeparameter from method completely. Dont know if there is any usage of it.
Metadata
Metadata
Assignees
Labels
No labels