Skip to content

[CS] Add missing commas #15819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ option when building each field:
'constraints' => [
new NotBlank(),
new Type(\DateTime::class),
]
],
])
->getForm();

Expand All @@ -713,7 +713,7 @@ option when building each field:
'constraints' => [
new NotBlank(),
new Type(\DateTime::class),
]
],
])
->getForm();
// ...
Expand Down
2 changes: 1 addition & 1 deletion components/property_access.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ You can also use multi dimensional arrays::
],
[
'first_name' => 'Ryan',
]
],
];

var_dump($propertyAccessor->getValue($persons, '[0][first_name]')); // 'Wouter'
Expand Down
8 changes: 4 additions & 4 deletions components/var_dumper/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ method::
$dumper->dump($var, $output, [
// 1 and 160 are the default values for these options
'maxDepth' => 1,
'maxStringLength' => 160
'maxStringLength' => 160,
]);

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

$varCloner = new VarCloner();
$var = ['test'];

$dumper = new CliDumper();
echo $dumper->dump($varCloner->cloneVar($var), true);

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

$varCloner = new VarCloner();
$var = ['test'];

$dumper = new CliDumper();
echo $dumper->dump($varCloner->cloneVar($var), true);

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

$varCloner = new VarCloner();
$var = ['test'];

$dumper = new CliDumper(null, null, AbstractDumper::DUMP_STRING_LENGTH | AbstractDumper::DUMP_LIGHT_ARRAY);
echo $dumper->dump($varCloner->cloneVar($var), true);

Expand Down
4 changes: 2 additions & 2 deletions components/var_exporter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ created by using the special ``"\0"`` property name to define their internal val

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

// creates an ArrayObject populated with $inputArray
$theObject = Instantiator::instantiate(ArrayObject::class, [
"\0" => [$inputArray]
"\0" => [$inputArray],
]);

.. _`OPcache`: https://www.php.net/opcache
Expand Down
4 changes: 2 additions & 2 deletions configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ This example shows how you could configure the database connection using an env
'dbal' => [
// by convention the env var names are always uppercase
'url' => '%env(resolve:DATABASE_URL)%',
]
],
]);
};

Expand Down Expand Up @@ -888,7 +888,7 @@ whenever a service/controller defines a ``$projectDir`` argument, use this:
// pass this value to any $projectDir argument for any service
// that's created in this file (including controller arguments)
->bind('$projectDir', '%kernel.project_dir%');

// ...
};

Expand Down
2 changes: 1 addition & 1 deletion configuration/secrets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ If you stored a ``DATABASE_PASSWORD`` secret, you can reference it by:
$container->loadFromExtension('doctrine', [
'dbal' => [
'password' => '%env(DATABASE_PASSWORD)%',
]
],
]);

The actual value will be resolved at runtime: container compilation and cache
Expand Down
4 changes: 2 additions & 2 deletions create_framework/unit_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ using `PHPUnit`_. Create a PHPUnit configuration file in
<directory suffix=".php">./src</directory>
</include>
</coverage>

<testsuites>
<testsuite name="Test Suite">
<directory>./tests</directory>
Expand Down Expand Up @@ -167,7 +167,7 @@ Response::
->will($this->returnValue([
'_route' => 'is_leap_year/{year}',
'year' => '2000',
'_controller' => [new LeapYearController(), 'index']
'_controller' => [new LeapYearController(), 'index'],
]))
;
$matcher
Expand Down
4 changes: 2 additions & 2 deletions doctrine/multiple_entity_managers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ The following configuration code shows how you can configure two entity managers
'dir' => '%kernel.project_dir%/src/Entity/Main',
'prefix' => 'App\Entity\Main',
'alias' => 'Main',
]
],
],
],
'customer' => [
Expand All @@ -173,7 +173,7 @@ The following configuration code shows how you can configure two entity managers
'dir' => '%kernel.project_dir%/src/Entity/Customer',
'prefix' => 'App\Entity\Customer',
'alias' => 'Customer',
]
],
],
],
],
Expand Down
2 changes: 1 addition & 1 deletion mailer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ over SMTP by configuring the DSN in your ``.env`` file (the ``user``,
$containerConfigurator->extension('framework', [
'mailer' => [
'dsn' => '%env(MAILER_DSN)%',
]
],
]);
};

Expand Down
4 changes: 2 additions & 2 deletions mercure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ Add your JWT secret to the configuration as follow:
'url' => 'https://mercure-hub.example.com/.well-known/mercure',
'jwt' => [
'secret' => '!ChangeMe!',
]
],
],
],
]);
Expand Down Expand Up @@ -498,7 +498,7 @@ Then, reference this service in the bundle configuration:
'url' => 'https://mercure-hub.example.com/.well-known/mercure',
'jwt' => [
'provider' => MyJwtProvider::class,
]
],
],
],
]);
Expand Down
6 changes: 3 additions & 3 deletions reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3126,9 +3126,9 @@ recipients set in the code.
'recipients' => [
'[email protected]',
'[email protected]',
]
]
]
],
],
],
]);
};

Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/birthday.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ values for the year, month and day fields::
$builder->add('birthdate', BirthdayType::class, [
'placeholder' => [
'year' => 'Year', 'month' => 'Month', 'day' => 'Day',
]
],
]);

.. include:: /reference/forms/types/options/date_format.rst.inc
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/date.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ values for the year, month and day fields::
$builder->add('dueDate', DateType::class, [
'placeholder' => [
'year' => 'Year', 'month' => 'Month', 'day' => 'Day',
]
],
]);

.. _reference-forms-type-date-format:
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/dateinterval.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ add a "blank" entry to the top of each select box::
Alternatively, you can specify a string to be displayed for the "blank" value::

$builder->add('remindEvery', DateIntervalType::class, [
'placeholder' => ['years' => 'Years', 'months' => 'Months', 'days' => 'Days']
'placeholder' => ['years' => 'Years', 'months' => 'Months', 'days' => 'Days'],
]);

``hours``
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ values for the year, month, day, hour, minute and second fields::
'placeholder' => [
'year' => 'Year', 'month' => 'Month', 'day' => 'Day',
'hour' => 'Hour', 'minute' => 'Minute', 'second' => 'Second',
]
],
]);

format
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/range.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Basic Usage
'attr' => [
'min' => 5,
'max' => 50
]
],
]);

Inherited Options
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/time.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ values for the hour, minute and second fields::
$builder->add('startTime', 'time', [
'placeholder' => [
'hour' => 'Hour', 'minute' => 'Minute', 'second' => 'Second',
]
],
]);

.. include:: /reference/forms/types/options/hours.rst.inc
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/week.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ values for the year and week fields::
'placeholder' => [
'year' => 'Year',
'week' => 'Week',
]
],
]);

.. include:: /reference/forms/types/options/html5.rst.inc
Expand Down
2 changes: 1 addition & 1 deletion security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ command will pre-configure this for you:
User::class => [
'algorithm' => 'auto',
'cost' => 12,
]
],
],

// ...
Expand Down
4 changes: 2 additions & 2 deletions security/form_login_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ a traditional HTML form that submits to ``/login``:
'guard' => [
'authenticators' => [
LoginFormAuthenticator::class,
]
],
],
'logout' => [
'path' => 'app_logout',
Expand Down Expand Up @@ -507,7 +507,7 @@ whenever the user browses a page::
public static function getSubscribedEvents(): array
{
return [
KernelEvents::REQUEST => ['onKernelRequest']
KernelEvents::REQUEST => ['onKernelRequest'],
];
}
}
Expand Down
4 changes: 2 additions & 2 deletions security/ldap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ Configuration example for form login
// ...
],
],
]
],
]);

Configuration example for HTTP Basic
Expand Down Expand Up @@ -533,7 +533,7 @@ Configuration example for form login and query_string
'search_password' => 'the-raw-password',
],
],
]
],
]);

.. deprecated:: 4.4
Expand Down
2 changes: 1 addition & 1 deletion service_container/tags.rst
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ use this, update the compiler::
foreach ($tags as $attributes) {
$definition->addMethodCall('addTransport', [
new Reference($id),
$attributes['alias']
$attributes['alias'],
]);
}
}
Expand Down
2 changes: 1 addition & 1 deletion testing/http_authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ encoders configuration to generate password hashes as fast as possible:
'cost' => 4, // Lowest possible value for bcrypt
'time_cost' => 3, // Lowest possible value for argon
'memory_cost' => 10, // Lowest possible value for argon
]
],
],
]);

Expand Down