mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-21 01:41:00 +01:00
Merge pull request #1962 from adrozdek/fix/symfony-documentation
Fixed small typos for Symfony docs.
This commit is contained in:
commit
037ec9bf6c
@ -5402,8 +5402,7 @@ Changes createForm(new FormType), add(new FormType) to ones with "FormType::clas
|
||||
+ $form = $this->createForm(TeamType::class, $entity, [
|
||||
'action' => $this->generateUrl('teams_update', ['id' => $entity->getId()]),
|
||||
'method' => 'PUT',
|
||||
- ]);
|
||||
+ ));
|
||||
]);
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -5595,7 +5594,7 @@ Change "read_only" option in form to attribute
|
||||
function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
- $builder->add('cuid', TextType::class, ['read_only' => true]);
|
||||
+ $builder->add('cuid', TextType::class, ['attr' => [read_only' => true]]);
|
||||
+ $builder->add('cuid', TextType::class, ['attr' => ['read_only' => true]]);
|
||||
}
|
||||
```
|
||||
|
||||
@ -5698,7 +5697,7 @@ Turns string Form Type references to their CONSTANT alternatives in FormTypes in
|
||||
```diff
|
||||
$formBuilder = new Symfony\Component\Form\FormBuilder;
|
||||
-$formBuilder->add('name', 'form.type.text');
|
||||
+$form->add('name', \Symfony\Component\Form\Extension\Core\Type\TextType::class);
|
||||
+$formBuilder->add('name', \Symfony\Component\Form\Extension\Core\Type\TextType::class);
|
||||
```
|
||||
|
||||
<br>
|
||||
|
@ -50,7 +50,7 @@ CODE_SAMPLE
|
||||
,
|
||||
<<<'CODE_SAMPLE'
|
||||
$formBuilder = new Symfony\Component\Form\FormBuilder;
|
||||
$form->add('name', \Symfony\Component\Form\Extension\Core\Type\TextType::class);
|
||||
$formBuilder->add('name', \Symfony\Component\Form\Extension\Core\Type\TextType::class);
|
||||
CODE_SAMPLE
|
||||
),
|
||||
]
|
||||
|
@ -94,7 +94,7 @@ class SomeController
|
||||
$form = $this->createForm(TeamType::class, $entity, [
|
||||
'action' => $this->generateUrl('teams_update', ['id' => $entity->getId()]),
|
||||
'method' => 'PUT',
|
||||
));
|
||||
]);
|
||||
}
|
||||
}
|
||||
CODE_SAMPLE
|
||||
|
@ -52,7 +52,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder->add('cuid', TextType::class, ['attr' => [read_only' => true]]);
|
||||
$builder->add('cuid', TextType::class, ['attr' => ['read_only' => true]]);
|
||||
}
|
||||
CODE_SAMPLE
|
||||
),
|
||||
|
Loading…
x
Reference in New Issue
Block a user