Remove nullable parameter from createNamedBuilder call

The call to createNamedBuilder in EventController.php and ExportController.php was originally passing null as a parameter. This was generating PHPStan warnings. This commit replaces null with an empty string to comply with the method's expected types.
This commit is contained in:
Julien Fastré 2024-04-10 12:43:25 +02:00
parent 0b40d807bc
commit 3df57c1569
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
2 changed files with 1 additions and 11 deletions

View File

@ -100,11 +100,6 @@ parameters:
count: 1
path: src/Bundle/ChillEventBundle/Controller/EventController.php
-
message: "#^Parameter \\#1 \\$name of method Symfony\\\\Component\\\\Form\\\\FormFactoryInterface\\:\\:createNamedBuilder\\(\\) expects string, null given\\.$#"
count: 1
path: src/Bundle/ChillEventBundle/Controller/EventController.php
-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, Chill\\\\MainBundle\\\\Entity\\\\Center given\\.$#"
count: 1
@ -165,11 +160,6 @@ parameters:
count: 1
path: src/Bundle/ChillMainBundle/Controller/ExportController.php
-
message: "#^Parameter \\#1 \\$name of method Symfony\\\\Component\\\\Form\\\\FormFactoryInterface\\:\\:createNamedBuilder\\(\\) expects string, null given\\.$#"
count: 1
path: src/Bundle/ChillMainBundle/Controller/ExportController.php
-
message: "#^Parameter \\#3 \\$alias of method Chill\\\\MainBundle\\\\Controller\\\\ExportController\\:\\:exportFormStep\\(\\) expects string, Symfony\\\\Component\\\\HttpFoundation\\\\Request given\\.$#"
count: 1

View File

@ -288,7 +288,7 @@ class ExportController extends AbstractController
$builder = $this->formFactory
->createNamedBuilder(
null,
'',
FormType::class,
$defaultFormData,
[