@@ -44,14 +44,14 @@ This interface requires four methods:
44
44
45
45
Start by creating the class and these methods. Next, you'll learn how to fill each in::
46
46
47
- // src/Form/TypeGuesser/PHPDocTypeGuesser .php
47
+ // src/Form/TypeGuesser/PhpDocTypeGuesser .php
48
48
namespace App\Form\TypeGuesser;
49
49
50
50
use Symfony\Component\Form\FormTypeGuesserInterface;
51
51
use Symfony\Component\Form\Guess\TypeGuess;
52
52
use Symfony\Component\Form\Guess\ValueGuess;
53
53
54
- class PHPDocTypeGuesser implements FormTypeGuesserInterface
54
+ class PhpDocTypeGuesser implements FormTypeGuesserInterface
55
55
{
56
56
public function guessType(string $class, string $property): ?TypeGuess
57
57
{
@@ -90,9 +90,9 @@ The ``TypeGuess`` constructor requires three options:
90
90
type with the highest confidence is used.
91
91
92
92
With this knowledge, you can implement the ``guessType() `` method of the
93
- ``PHPDocTypeGuesser ``::
93
+ ``PhpDocTypeGuesser ``::
94
94
95
- // src/Form/TypeGuesser/PHPDocTypeGuesser .php
95
+ // src/Form/TypeGuesser/PhpDocTypeGuesser .php
96
96
namespace App\Form\TypeGuesser;
97
97
98
98
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
@@ -102,7 +102,7 @@ With this knowledge, you can implement the ``guessType()`` method of the
102
102
use Symfony\Component\Form\Guess\Guess;
103
103
use Symfony\Component\Form\Guess\TypeGuess;
104
104
105
- class PHPDocTypeGuesser implements FormTypeGuesserInterface
105
+ class PhpDocTypeGuesser implements FormTypeGuesserInterface
106
106
{
107
107
public function guessType(string $class, string $property): ?TypeGuess
108
108
{
@@ -188,7 +188,7 @@ and tag it with ``form.type_guesser``:
188
188
services :
189
189
# ...
190
190
191
- App\Form\TypeGuesser\PHPDocTypeGuesser :
191
+ App\Form\TypeGuesser\PhpDocTypeGuesser :
192
192
tags : [form.type_guesser]
193
193
194
194
.. code-block :: xml
@@ -201,7 +201,7 @@ and tag it with ``form.type_guesser``:
201
201
https://symfony.com/schema/dic/services/services-1.0.xsd" >
202
202
203
203
<services >
204
- <service id =" App\Form\TypeGuesser\PHPDocTypeGuesser " >
204
+ <service id =" App\Form\TypeGuesser\PhpDocTypeGuesser " >
205
205
<tag name =" form.type_guesser" />
206
206
</service >
207
207
</services >
@@ -210,9 +210,9 @@ and tag it with ``form.type_guesser``:
210
210
.. code-block :: php
211
211
212
212
// config/services.php
213
- use App\Form\TypeGuesser\PHPDocTypeGuesser ;
213
+ use App\Form\TypeGuesser\PhpDocTypeGuesser ;
214
214
215
- $container->register(PHPDocTypeGuesser ::class)
215
+ $container->register(PhpDocTypeGuesser ::class)
216
216
->addTag('form.type_guesser')
217
217
;
218
218
@@ -223,12 +223,12 @@ and tag it with ``form.type_guesser``:
223
223
:method: `Symfony\\ Component\\ Form\\ FormFactoryBuilder::addTypeGuessers ` of
224
224
the ``FormFactoryBuilder `` to register new type guessers::
225
225
226
- use App\Form\TypeGuesser\PHPDocTypeGuesser ;
226
+ use App\Form\TypeGuesser\PhpDocTypeGuesser ;
227
227
use Symfony\Component\Form\Forms;
228
228
229
229
$formFactory = Forms::createFormFactoryBuilder()
230
230
// ...
231
- ->addTypeGuesser(new PHPDocTypeGuesser ())
231
+ ->addTypeGuesser(new PhpDocTypeGuesser ())
232
232
->getFormFactory();
233
233
234
234
// ...
0 commit comments