phpstan / phpstan-nette

Nette Framework class reflection extension for PHPStan & framework-specific rules
MIT License
100 stars 35 forks source link

Added property events reflection extension for UI\Form #38

Closed adaamz closed 5 years ago

adaamz commented 5 years ago

Hi, I added specific callable types for events (right now only for Form, I can continue on others if we agree) - so phpstan can detect more bugs like this

$form->onSuccess[] = function(SubmitButton $button): void {}

Is this solution viable or we should try to change nette/forms library? https://github.com/nette/forms/pull/216

adaamz commented 5 years ago

pr in nette/forms was merged so we do not need this anymore