Skip to content

Commit d75f86a

Browse files
committed
Fixed more syntax errors
1 parent cedf9da commit d75f86a

12 files changed

+37
-29
lines changed

form/data_transformers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ slightly::
112112
$builder->add(
113113
$builder
114114
->create('tags', TextType::class)
115-
->addModelTransformer(...)
115+
->addModelTransformer(/* ... */)
116116
);
117117

118118
Example #2: Transforming an Issue Number into an Issue Entity

form/inherit_data_option.rst

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,18 @@ Finally, make this work by adding the location form to your two original forms::
129129
namespace App\Form\Type;
130130

131131
use App\Entity\Company;
132-
// ...
132+
use Symfony\Component\Form\AbstractType;
133133

134-
public function buildForm(FormBuilderInterface $builder, array $options): void
134+
class CompanyType extends AbstractType
135135
{
136-
// ...
136+
public function buildForm(FormBuilderInterface $builder, array $options): void
137+
{
138+
// ...
137139

138-
$builder->add('foo', LocationType::class, [
139-
'data_class' => Company::class,
140-
]);
140+
$builder->add('foo', LocationType::class, [
141+
'data_class' => Company::class,
142+
]);
143+
}
141144
}
142145

143146
.. code-block:: php
@@ -146,15 +149,18 @@ Finally, make this work by adding the location form to your two original forms::
146149
namespace App\Form\Type;
147150
148151
use App\Entity\Customer;
149-
// ...
152+
use Symfony\Component\Form\AbstractType;
150153
151-
public function buildForm(FormBuilderInterface $builder, array $options): void
154+
class CustomerType extends AbstractType
152155
{
153-
// ...
156+
public function buildForm(FormBuilderInterface $builder, array $options): void
157+
{
158+
// ...
154159
155-
$builder->add('bar', LocationType::class, [
156-
'data_class' => Customer::class,
157-
]);
160+
$builder->add('bar', LocationType::class, [
161+
'data_class' => Customer::class,
162+
]);
163+
}
158164
}
159165
160166
That's it! You have extracted duplicated field definitions to a separate

form/use_empty_data.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ your form. For example, in a controller::
1111

1212
public function index(): Response
1313
{
14-
$blog = ...;
14+
$blog = $this->database->fetch();
1515

1616
// $blog is passed in as the data, so the empty_data
1717
// option is not needed

form/validation_groups.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ this as an option when :ref:`creating forms in controllers <creating-forms-in-co
1313

1414
$form = $this->createFormBuilder($user, [
1515
'validation_groups' => ['registration'],
16-
])->add(...);
16+
])->add(/* ... */);
1717

1818
When :ref:`creating forms in classes <creating-forms-in-classes>`, add the
1919
following to the ``configureOptions()`` method::
@@ -32,7 +32,9 @@ In both of these cases, *only* the ``registration`` validation group will
3232
be used to validate the underlying object. To apply the ``registration``
3333
group *and* all constraints that are not in a group, use::
3434

35-
'validation_groups' => ['Default', 'registration']
35+
[
36+
'validation_groups' => ['Default', 'registration']
37+
];
3638

3739
.. note::
3840

http_client.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ each request (which overrides any global authentication):
428428
auth-bearer="the-bearer-token"
429429
auth-ntlm="the-username:the-password"
430430
/>
431-
</framework-http-client>
431+
</framework:http-client>
432432
</framework:config>
433433
</container>
434434

logging/monolog_exclude_http_codes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ logging these HTTP codes based on the MonologBundle configuration:
5454
'main' => [
5555
// ...
5656
'type' => 'fingers_crossed',
57-
'handler' => ...,
57+
'handler' => 'acme_handler', // Some handler
5858
'excluded_http_codes' => [403, 404],
5959
],
6060
],

logging/monolog_regex_based_excludes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ configuration:
2828
main:
2929
# ...
3030
type: fingers_crossed
31-
handler: 'acme_handler' // Some handler
31+
handler: 'acme_handler' # Some handler
3232
excluded_404s:
3333
- ^/phpmyadmin
3434

messenger/multiple_buses.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ an **event bus**. The event bus could have zero or more subscribers.
5656
<framework:bus name="command.bus">
5757
<framework:middleware id="validation"/>
5858
<framework:middleware id="doctrine_transaction"/>
59-
<framework:bus>
59+
</framework:bus>
6060
<framework:bus name="query.bus">
6161
<framework:middleware id="validation"/>
62-
<framework:bus>
62+
</framework:bus>
6363
<framework:bus name="event.bus" default-middleware="allow_no_handlers">
6464
<framework:middleware id="validation"/>
65-
<framework:bus>
65+
</framework:bus>
6666
</framework:messenger>
6767
</framework:config>
6868
</container>

reference/configuration/framework.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2751,7 +2751,7 @@ To configure a Redis cache pool with a default lifetime of 1 hour, do the follow
27512751
<framework:pool
27522752
name="cache.mycache"
27532753
adapter="cache.adapter.redis"
2754-
default-lifetime=3600
2754+
default-lifetime="3600"
27552755
/>
27562756
</framework:cache>
27572757
<!-- ... -->

service_container.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,6 @@ for classes under the same namespace:
10331033
<services>
10341034
<prototype namespace="App\Domain"
10351035
resource="../src/App/Domain/*"/>
1036-
</prototype>
10371036
10381037
<!-- ... -->
10391038
</services>

templates.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,11 @@ also provides a method to check for template existence. First, get the loader::
553553
// in a service using autowiring
554554
use Twig\Environment;
555555

556-
public function __construct(Environment $twig)
557-
{
558-
$loader = $twig->getLoader();
556+
class Acme {
557+
public function __construct(Environment $twig)
558+
{
559+
$loader = $twig->getLoader();
560+
}
559561
}
560562

561563
Then, pass the path of the Twig template to the ``exists()`` method of the loader::

workflow/dumping-workflows.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ You can use ``metadata`` with the following keys to style the workflow:
6363

6464
* ``bg_color``: a color;
6565
* ``description``: a string that describes the state.
66-
66+
6767
* for transitions:
6868

6969
* ``label``: a string that replaces the name of the transition;
@@ -169,7 +169,6 @@ Below is the configuration for the pull request state machine with styling added
169169
<framework:bg_color>DeepSkyBlue</framework:bg_color>
170170
</framework:metadata>
171171
</framework:place>
172-
</framework:place>
173172
174173
<framework:transition name="submit">
175174
<framework:from>start</framework:from>

0 commit comments

Comments
 (0)