File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -336,7 +336,7 @@ public function offsetUnset(mixed $name): void
336
336
public function disableValidation (): static
337
337
{
338
338
foreach ($ this ->fields ->all () as $ field ) {
339
- if ($ field instanceof Field \ ChoiceFormField) {
339
+ if ($ field instanceof ChoiceFormField) {
340
340
$ field ->disableValidation ();
341
341
}
342
342
}
@@ -444,14 +444,14 @@ private function addField(\DOMElement $node): void
444
444
445
445
$ nodeName = $ node ->nodeName ;
446
446
if ('select ' == $ nodeName || 'input ' == $ nodeName && 'checkbox ' == strtolower ($ node ->getAttribute ('type ' ))) {
447
- $ this ->set (new Field \ ChoiceFormField ($ node ));
447
+ $ this ->set (new ChoiceFormField ($ node ));
448
448
} elseif ('input ' == $ nodeName && 'radio ' == strtolower ($ node ->getAttribute ('type ' ))) {
449
449
// there may be other fields with the same name that are no choice
450
450
// fields already registered (see https://github.com/symfony/symfony/issues/11689)
451
451
if ($ this ->has ($ node ->getAttribute ('name ' )) && $ this ->get ($ node ->getAttribute ('name ' )) instanceof ChoiceFormField) {
452
452
$ this ->get ($ node ->getAttribute ('name ' ))->addChoice ($ node );
453
453
} else {
454
- $ this ->set (new Field \ ChoiceFormField ($ node ));
454
+ $ this ->set (new ChoiceFormField ($ node ));
455
455
}
456
456
} elseif ('input ' == $ nodeName && 'file ' == strtolower ($ node ->getAttribute ('type ' ))) {
457
457
$ this ->set (new Field \FileFormField ($ node ));
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ public function has(string $name): bool
106
106
public function set (string $ name , mixed $ value ): void
107
107
{
108
108
$ target = &$ this ->get ($ name );
109
- if ((!\is_array ($ value ) && $ target instanceof Field \ FormField) || $ target instanceof Field \ChoiceFormField) {
109
+ if ((!\is_array ($ value ) && $ target instanceof FormField) || $ target instanceof Field \ChoiceFormField) {
110
110
$ target ->setValue ($ value );
111
111
} elseif (\is_array ($ value )) {
112
112
$ registry = new static ();
You can’t perform that action at this time.
0 commit comments