This big if-else condition could be avoided:
```php
if ($ref->getNumberOfParameters() <= 1) {
    Nette\Utils\Callback::invoke($handler, $this);
    continue;
}
```