Open
Description
Hi, i have problems with latest nette/forms and phpstan 1.0.. i will describe it on presenter, but same errors are in control...
<?php declare(strict_types = 1);
namespace App\Presenters;
use Nette\Application\UI\Form;
use Nette\Application\UI\Presenter;
use Nette\Utils\ArrayHash;
final class HomepagePresenter extends Presenter
{
protected function createCompomentForm(): Form
{
$form = new Form();
$form->onSuccess[] = function (Form $form, ArrayHash $values): void {
};
$form->onSuccess[] = [$this, 'formOnSuccess'];
return $form;
}
public function formOnSuccess(Form $form, ArrayHash $values): void
{
}
}
------ ---------------------------------------------------------------------------------
Line Presenters/HomepagePresenter.php
------ ---------------------------------------------------------------------------------
15 Array (array<callable(Nette\Application\UI\Form, mixed): void>) does not accept
Closure(Nette\Application\UI\Form, Nette\Utils\ArrayHash): void.
18 Array (array<callable(Nette\Application\UI\Form, mixed): void>) does not accept
array{$this(App\Presenters\HomepagePresenter), 'formOnSuccess'}.
------ ---------------------------------------------------------------------------------
Metadata
Metadata
Assignees
Labels
No labels