Skip to content

Commit e881358

Browse files
keradusnicolas-grekas
authored andcommitted
chore: CS fixes
1 parent 3bb1e2c commit e881358

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Form.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ public function offsetUnset(mixed $name): void
336336
public function disableValidation(): static
337337
{
338338
foreach ($this->fields->all() as $field) {
339-
if ($field instanceof Field\ChoiceFormField) {
339+
if ($field instanceof ChoiceFormField) {
340340
$field->disableValidation();
341341
}
342342
}
@@ -444,14 +444,14 @@ private function addField(\DOMElement $node): void
444444

445445
$nodeName = $node->nodeName;
446446
if ('select' == $nodeName || 'input' == $nodeName && 'checkbox' == strtolower($node->getAttribute('type'))) {
447-
$this->set(new Field\ChoiceFormField($node));
447+
$this->set(new ChoiceFormField($node));
448448
} elseif ('input' == $nodeName && 'radio' == strtolower($node->getAttribute('type'))) {
449449
// there may be other fields with the same name that are no choice
450450
// fields already registered (see https://github.com/symfony/symfony/issues/11689)
451451
if ($this->has($node->getAttribute('name')) && $this->get($node->getAttribute('name')) instanceof ChoiceFormField) {
452452
$this->get($node->getAttribute('name'))->addChoice($node);
453453
} else {
454-
$this->set(new Field\ChoiceFormField($node));
454+
$this->set(new ChoiceFormField($node));
455455
}
456456
} elseif ('input' == $nodeName && 'file' == strtolower($node->getAttribute('type'))) {
457457
$this->set(new Field\FileFormField($node));

FormFieldRegistry.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function has(string $name): bool
106106
public function set(string $name, mixed $value): void
107107
{
108108
$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) {
110110
$target->setValue($value);
111111
} elseif (\is_array($value)) {
112112
$registry = new static();

0 commit comments

Comments
 (0)