[TOOLS][PHPStan] Raise PHPStan level to 3 and fix new errors

This commit is contained in:
2021-09-09 01:08:45 +01:00
parent 9d7f43cd28
commit b74d944ae3
6 changed files with 17 additions and 4 deletions

View File

@@ -36,6 +36,7 @@ use App\Util\Formatting;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Form as SymfForm;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\Form\FormInterface as SymfFormInterface;
use Symfony\Component\HttpFoundation\Request;
/**
@@ -86,7 +87,7 @@ abstract class Form
?object $target = null,
array $extra_data = [],
string $type = 'Symfony\Component\Form\Extension\Core\Type\FormType',
array $form_options = []): SymfForm
array $form_options = []): SymfFormInterface
{
$name = $form[array_key_last($form)][0];
$fb = self::$form_factory->createNamedBuilder($name, $type, data: null, options: array_merge($form_options, ['translation_domain' => false]));