Skip to content

more indention fixes #11506

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
Apr 30, 2019
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
22 changes: 11 additions & 11 deletions cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ You can also create more customized pools. All you need is an adapter:

<framework:config>
<framework:cache default_memcached_provider="memcached://localhost">
<framework:pool name="my_cache_pool" adapter="cache.adapter.array"/>
<framework:pool name="cache.acme" adapter="cache.adapter.memcached"/>
<framework:pool name="cache.foobar" adapter="cache.adapter.memcached" provider="memcached://user:[email protected]"/>
<framework:pool name="my_cache_pool" adapter="cache.adapter.array"/>
<framework:pool name="cache.acme" adapter="cache.adapter.memcached"/>
<framework:pool name="cache.foobar" adapter="cache.adapter.memcached" provider="memcached://user:[email protected]"/>
</framework:cache>
</framework:config>
</container>
Expand Down Expand Up @@ -281,11 +281,11 @@ For advanced configurations it could sometimes be useful to use a pool as an ada

<framework:config>
<framework:cache app="my_cache_pool">
<framework:pool name="my_cache_pool" adapter="cache.adapter.memcached" provider="memcached://user:[email protected]"/>
<framework:pool name="cache.short_cache" adapter="my_cache_pool" default_lifetime="604800"/>
<framework:pool name="cache.long_cache" adapter="my_cache_pool" default_lifetime="604800"/>
<!-- "cache.adapter.filesystem" is the default for "cache.app" -->
<framework:pool name="my_configured_app_cache" adapter="cache.adapter.filesystem" default_lifetime="3600"/>
<framework:pool name="my_cache_pool" adapter="cache.adapter.memcached" provider="memcached://user:[email protected]"/>
<framework:pool name="cache.short_cache" adapter="my_cache_pool" default_lifetime="604800"/>
<framework:pool name="cache.long_cache" adapter="my_cache_pool" default_lifetime="604800"/>
<!-- "cache.adapter.filesystem" is the default for "cache.app" -->
<framework:pool name="my_configured_app_cache" adapter="cache.adapter.filesystem" default_lifetime="3600"/>
</framework:cache>
</framework:config>
</container>
Expand Down Expand Up @@ -359,7 +359,7 @@ and use that when configuring the pool.

<framework:config>
<framework:cache>
<framework:pool name="cache.my_redis" adapter="cache.adapter.redis" provider="app.my_custom_redis_provider"/>
<framework:pool name="cache.my_redis" adapter="cache.adapter.redis" provider="app.my_custom_redis_provider"/>
</framework:cache>
</framework:config>

Expand Down Expand Up @@ -437,8 +437,8 @@ case the value needs to be recalculated.

<framework:config>
<framework:cache default_memcached_provider="memcached://localhost">
<framework:pool name="my_cache_pool" adapter="app.my_cache_chain_adapter"/>
<framework:pool name="cache.my_redis" adapter="cache.adapter.redis" provider="redis://user:[email protected]"/>
<framework:pool name="my_cache_pool" adapter="app.my_cache_chain_adapter"/>
<framework:pool name="cache.my_redis" adapter="cache.adapter.redis" provider="redis://user:[email protected]"/>
</framework:cache>
</framework:config>

Expand Down
4 changes: 2 additions & 2 deletions components/cache/adapters/proxy_adapter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ and optionally a namespace and default cache lifetime as its second and third pa
use Psr\Cache\CacheItemPoolInterface;
use Symfony\Component\Cache\Adapter\ProxyAdapter;

\\ create your own cache pool instance that implements the PSR-6
\\ interface `CacheItemPoolInterface`
// create your own cache pool instance that implements
// the PSR-6 CacheItemPoolInterface
$psr6CachePool = ...

$cache = new ProxyAdapter(
Expand Down
24 changes: 12 additions & 12 deletions components/dom_crawler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -338,31 +338,31 @@ This behavior is best illustrated with examples::

$crawler->filterXPath('//span[contains(@id, "article-")]')->evaluate('substring-after(@id, "-")');
/* array:3 [
0 => "100",
1 => "101",
2 => "102",
0 => "100"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reverts the changes made in the previous PR. Is that OK?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes unless we found a decision. I opened a thread in the team forum. 👍🏻

1 => "101"
2 => "102"
]
*/
*/

$crawler->evaluate('substring-after(//span[contains(@id, "article-")]/@id, "-")');
/* array:1 [
0 => "100",
0 => "100"
]
*/
*/

$crawler->filterXPath('//span[@class="article"]')->evaluate('count(@id)');
/* array:3 [
0 => 1.0,
1 => 1.0,
2 => 1.0,
0 => 1.0
1 => 1.0
2 => 1.0
]
*/
*/

$crawler->evaluate('count(//span[@class="article"])');
/* array:1 [
0 => 3.0,
0 => 3.0
]
*/
*/

$crawler->evaluate('//span[1]');
// A Symfony\Component\DomCrawler\Crawler instance
Expand Down
26 changes: 13 additions & 13 deletions components/translation/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -453,19 +453,19 @@ loaded/dumped when using this component inside a Symfony application:
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0"
srcLang="fr-FR" trgLang="en-US">
<file id="messages.en_US">
<unit id="LCa0a2j">
<notes>
<note category="state">new</note>
<note category="approved">true</note>
<note category="section" priority="1">user login</note>
</notes>
<segment>
<source>original-content</source>
<target>translated-content</target>
</segment>
</unit>
</file>
<file id="messages.en_US">
<unit id="LCa0a2j">
<notes>
<note category="state">new</note>
<note category="approved">true</note>
<note category="section" priority="1">user login</note>
</notes>
<segment>
<source>original-content</source>
<target>translated-content</target>
</segment>
</unit>
</file>
</xliff>

When using the standalone Translation component, call the ``setMetadata()``
Expand Down
10 changes: 5 additions & 5 deletions console/command_in_controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ Run this command from inside your controller via::
$application->setAutoExit(false);

$input = new ArrayInput([
'command' => 'swiftmailer:spool:send',
// (optional) define the value of command arguments
'fooArgument' => 'barValue',
// (optional) pass options to the command
'--message-limit' => $messages,
'command' => 'swiftmailer:spool:send',
// (optional) define the value of command arguments
'fooArgument' => 'barValue',
// (optional) pass options to the command
'--message-limit' => $messages,
]);

// You can use NullOutput() if you don't need the output
Expand Down
10 changes: 5 additions & 5 deletions event_dispatcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ listen to the same ``kernel.exception`` event::
{
// return the subscribed events, their methods and priorities
return [
KernelEvents::EXCEPTION => [
['processException', 10],
['logException', 0],
['notifyException', -10],
]
KernelEvents::EXCEPTION => [
['processException', 10],
['logException', 0],
['notifyException', -10],
],
];
}

Expand Down
2 changes: 1 addition & 1 deletion form/dynamic_form_modification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ how to customize your form based on three common use-cases:
1) :ref:`form-events-underlying-data`

Example: you have a "Product" form and need to modify/add/remove a field
based on the data on the underlying Product being edited.
based on the data on the underlying Product being edited.

2) :ref:`form-events-user-data`

Expand Down
18 changes: 9 additions & 9 deletions form/without_class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,15 @@ but here's a short example::
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('firstName', TextType::class, [
'constraints' => new Length(['min' => 3]),
])
->add('lastName', TextType::class, [
'constraints' => [
new NotBlank(),
new Length(['min' => 3]),
],
])
->add('firstName', TextType::class, [
'constraints' => new Length(['min' => 3]),
])
->add('lastName', TextType::class, [
'constraints' => [
new NotBlank(),
new Length(['min' => 3]),
],
])
;
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/assetic/uglifyjs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ helper:
.. code-block:: html+twig

{% stylesheets 'bundles/App/css/*' filter='uglifycss' filter='cssrewrite' %}
<link rel="stylesheet" href="{{ asset_url }}"/>
<link rel="stylesheet" href="{{ asset_url }}"/>
{% endstylesheets %}

Just like with the ``uglifyjs2`` filter, if you prefix the filter name with
Expand Down
2 changes: 1 addition & 1 deletion introduction/http_fundamentals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ like this:
Content-Type: text/html

<html>
<!-- ... HTML for the xkcd comic -->
<!-- ... HTML for the xkcd comic -->
</html>

The HTTP response contains the requested resource (the HTML content in this
Expand Down
8 changes: 4 additions & 4 deletions security/custom_authentication_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -555,10 +555,10 @@ the ``addConfiguration()`` method::

public function addConfiguration(NodeDefinition $node)
{
$node
->children()
->scalarNode('lifetime')->defaultValue(300)
->end();
$node
->children()
->scalarNode('lifetime')->defaultValue(300)
->end();
}
}

Expand Down
2 changes: 1 addition & 1 deletion security/multiple_guard_authenticators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This is how your security configuration can look in action:

# app/config/security.yml
security:
# ...
# ...
firewalls:
default:
anonymous: ~
Expand Down
8 changes: 4 additions & 4 deletions service_container/3.3-di-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -637,10 +637,10 @@ Now you're ready to default all services to be private:
# ...

services:
_defaults:
autowire: true
autoconfigure: true
+ public: false
_defaults:
autowire: true
autoconfigure: true
+ public: false

Thanks to this, any services created in this file cannot be fetched directly from
the container. But, since the old service id's are aliases in a separate file (``legacy_aliases.yml``),
Expand Down
2 changes: 1 addition & 1 deletion service_container/autowiring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ Now that you have an interface, you should use this as your type-hint::
{
public function __construct(TransformerInterface $transformer)
{
// ...
// ...
}

// ...
Expand Down
4 changes: 2 additions & 2 deletions service_container/debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To see a list of all of the available types that can be used for autowiring, run

.. versionadded:: 3.4

The ``debug:autowiring`` command was introduced in Symfony 3.3.
The ``debug:autowiring`` command was introduced in Symfony 3.3.

Detailed Info about a Single Service
------------------------------------
Expand All @@ -43,4 +43,4 @@ its id:

.. versionadded:: 3.3

The ``--show-arguments`` option was introduced in Symfony 3.3.
The ``--show-arguments`` option was introduced in Symfony 3.3.
6 changes: 3 additions & 3 deletions service_container/injection_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ service container configuration:

.. code-block:: yaml

services:
services:
# ...

AppBundle\Mail\NewsletterManager:
Expand Down Expand Up @@ -120,7 +120,7 @@ that accepts the dependency::

.. code-block:: yaml

services:
services:
# ...

app.newsletter_manager:
Expand Down Expand Up @@ -192,7 +192,7 @@ Another possibility is just setting public fields of the class directly::

.. code-block:: yaml

services:
services:
# ...

app.newsletter_manager:
Expand Down
4 changes: 2 additions & 2 deletions templating/PHP.rst
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,9 @@ form is rendered.
'AppBundle:Form',
],
],
],
],

// ...
// ...
]);

By default, the PHP engine uses a *div* layout when rendering forms. Some people,
Expand Down
22 changes: 11 additions & 11 deletions templating/global_variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ This is possible inside your ``app/config/config.yml`` file:

// app/config/config.php
$container->loadFromExtension('twig', [
// ...
'globals' => [
'ga_tracking' => 'UA-xxxxx-x',
],
// ...
'globals' => [
'ga_tracking' => 'UA-xxxxx-x',
],
]);

Now, the variable ``ga_tracking`` is available in all Twig templates:
Expand Down Expand Up @@ -95,9 +95,9 @@ system, which lets you isolate or reuse the value:

// app/config/config.php
$container->loadFromExtension('twig', [
'globals' => [
'ga_tracking' => '%ga_tracking%',
],
'globals' => [
'ga_tracking' => '%ga_tracking%',
],
]);

The same variable is available exactly as before.
Expand Down Expand Up @@ -151,8 +151,8 @@ This should feel familiar, as it's the same syntax you use in service configurat

// app/config/config.php
$container->loadFromExtension('twig', [
// ...
'globals' => [
'user_management' => '@AppBundle\Service\UserManagement',
],
// ...
'globals' => [
'user_management' => '@AppBundle\Service\UserManagement',
],
]);
4 changes: 2 additions & 2 deletions testing/http_authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ firewall, but only in the configuration file used by tests:
<security:config>
<!-- replace 'main' by the name of your own firewall -->
<security:firewall name="main">
<security:http-basic/>
</security:firewall>
<security:http-basic/>
</security:firewall>
</security:config>

.. code-block:: php
Expand Down