phpstan-drupal
phpstan-drupal copied to clipboard
Validate FormBuilderInterface::getForm() arguments by inspecting form class
Feature request
While https://www.drupal.org/node/3432087 should improve phpstan processing of FormBuilderInterface::getForm(), it'd be great if we could use the first argument to look up what other arguments are valid.
For example when analyzing the following
$this->formBuilder->getForm(EntityModerationForm::class, $entity);
The correct number and types of arguments can be found by inspecting EntityModerationForm::buildForm().
This may also be relevant: https://www.drupal.org/project/drupal/issues/3431285