Skip to content

Commit 93c7e93

Browse files
committed
minor #15819 [CS] Add missing commas (sebpacz)
This PR was merged into the 4.4 branch. Discussion ---------- [CS] Add missing commas This PR adds missing commas to examples with multi-line arrays. Maybe it would be a good idea to add a new rule to https://github.com/OskarStark/doctor-rst? Commits ------- 00583e4 [CS] Add missing commas
2 parents 798bbfc + 00583e4 commit 93c7e93

File tree

23 files changed

+36
-36
lines changed

23 files changed

+36
-36
lines changed

components/form.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ option when building each field:
686686
'constraints' => [
687687
new NotBlank(),
688688
new Type(\DateTime::class),
689-
]
689+
],
690690
])
691691
->getForm();
692692
@@ -713,7 +713,7 @@ option when building each field:
713713
'constraints' => [
714714
new NotBlank(),
715715
new Type(\DateTime::class),
716-
]
716+
],
717717
])
718718
->getForm();
719719
// ...

components/property_access.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ You can also use multi dimensional arrays::
7272
],
7373
[
7474
'first_name' => 'Ryan',
75-
]
75+
],
7676
];
7777

7878
var_dump($propertyAccessor->getValue($persons, '[0][first_name]')); // 'Wouter'

components/var_dumper/advanced.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ method::
200200
$dumper->dump($var, $output, [
201201
// 1 and 160 are the default values for these options
202202
'maxDepth' => 1,
203-
'maxStringLength' => 160
203+
'maxStringLength' => 160,
204204
]);
205205

206206
The output format of a dumper can be fine tuned by the two flags
@@ -223,7 +223,7 @@ next to its content::
223223

224224
$varCloner = new VarCloner();
225225
$var = ['test'];
226-
226+
227227
$dumper = new CliDumper();
228228
echo $dumper->dump($varCloner->cloneVar($var), true);
229229

@@ -248,7 +248,7 @@ similar to PHP's short array notation::
248248

249249
$varCloner = new VarCloner();
250250
$var = ['test'];
251-
251+
252252
$dumper = new CliDumper();
253253
echo $dumper->dump($varCloner->cloneVar($var), true);
254254

@@ -273,7 +273,7 @@ using the logical OR operator ``|``::
273273

274274
$varCloner = new VarCloner();
275275
$var = ['test'];
276-
276+
277277
$dumper = new CliDumper(null, null, AbstractDumper::DUMP_STRING_LENGTH | AbstractDumper::DUMP_LIGHT_ARRAY);
278278
echo $dumper->dump($varCloner->cloneVar($var), true);
279279

components/var_exporter.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ created by using the special ``"\0"`` property name to define their internal val
120120

121121
// Creates an SplObjectHash where $info1 is associated to $object1, etc.
122122
$theObject = Instantiator::instantiate(SplObjectStorage::class, [
123-
"\0" => [$object1, $info1, $object2, $info2...]
123+
"\0" => [$object1, $info1, $object2, $info2...],
124124
]);
125125

126126
// creates an ArrayObject populated with $inputArray
127127
$theObject = Instantiator::instantiate(ArrayObject::class, [
128-
"\0" => [$inputArray]
128+
"\0" => [$inputArray],
129129
]);
130130

131131
.. _`OPcache`: https://www.php.net/opcache

configuration.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ This example shows how you could configure the database connection using an env
521521
'dbal' => [
522522
// by convention the env var names are always uppercase
523523
'url' => '%env(resolve:DATABASE_URL)%',
524-
]
524+
],
525525
]);
526526
};
527527
@@ -888,7 +888,7 @@ whenever a service/controller defines a ``$projectDir`` argument, use this:
888888
// pass this value to any $projectDir argument for any service
889889
// that's created in this file (including controller arguments)
890890
->bind('$projectDir', '%kernel.project_dir%');
891-
891+
892892
// ...
893893
};
894894

configuration/secrets.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ If you stored a ``DATABASE_PASSWORD`` secret, you can reference it by:
145145
$container->loadFromExtension('doctrine', [
146146
'dbal' => [
147147
'password' => '%env(DATABASE_PASSWORD)%',
148-
]
148+
],
149149
]);
150150
151151
The actual value will be resolved at runtime: container compilation and cache

create_framework/unit_testing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ using `PHPUnit`_. Create a PHPUnit configuration file in
2626
<directory suffix=".php">./src</directory>
2727
</include>
2828
</coverage>
29-
29+
3030
<testsuites>
3131
<testsuite name="Test Suite">
3232
<directory>./tests</directory>
@@ -167,7 +167,7 @@ Response::
167167
->will($this->returnValue([
168168
'_route' => 'is_leap_year/{year}',
169169
'year' => '2000',
170-
'_controller' => [new LeapYearController(), 'index']
170+
'_controller' => [new LeapYearController(), 'index'],
171171
]))
172172
;
173173
$matcher

doctrine/multiple_entity_managers.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ The following configuration code shows how you can configure two entity managers
161161
'dir' => '%kernel.project_dir%/src/Entity/Main',
162162
'prefix' => 'App\Entity\Main',
163163
'alias' => 'Main',
164-
]
164+
],
165165
],
166166
],
167167
'customer' => [
@@ -173,7 +173,7 @@ The following configuration code shows how you can configure two entity managers
173173
'dir' => '%kernel.project_dir%/src/Entity/Customer',
174174
'prefix' => 'App\Entity\Customer',
175175
'alias' => 'Customer',
176-
]
176+
],
177177
],
178178
],
179179
],

mailer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ over SMTP by configuring the DSN in your ``.env`` file (the ``user``,
6161
$containerConfigurator->extension('framework', [
6262
'mailer' => [
6363
'dsn' => '%env(MAILER_DSN)%',
64-
]
64+
],
6565
]);
6666
};
6767

mercure.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ Add your JWT secret to the configuration as follow:
400400
'url' => 'https://mercure-hub.example.com/.well-known/mercure',
401401
'jwt' => [
402402
'secret' => '!ChangeMe!',
403-
]
403+
],
404404
],
405405
],
406406
]);
@@ -498,7 +498,7 @@ Then, reference this service in the bundle configuration:
498498
'url' => 'https://mercure-hub.example.com/.well-known/mercure',
499499
'jwt' => [
500500
'provider' => MyJwtProvider::class,
501-
]
501+
],
502502
],
503503
],
504504
]);

0 commit comments

Comments
 (0)