Skip to content

fix indention #11508

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
May 3, 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
4 changes: 2 additions & 2 deletions bundles/extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ I/O operations and increases the application performance.

.. versionadded:: 3.2

The ``addAnnotatedClassesToCompile()`` method was introduced in Symfony 3.2.
The ``addAnnotatedClassesToCompile()`` method was introduced in Symfony 3.2.

Your bundles can also add their own classes into this file thanks to the
``addClassesToCompile()`` and ``addAnnotatedClassesToCompile()`` methods (both
Expand Down Expand Up @@ -178,7 +178,7 @@ class names::

.. versionadded:: 3.2

The option to add classes to compile using patterns was introduced in Symfony 3.2.
The option to add classes to compile using patterns was introduced in Symfony 3.2.

The classes to compile can also be added using file path patterns::

Expand Down
4 changes: 2 additions & 2 deletions components/cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Cache (PSR-6) Versus Simple Cache (PSR-16)
This component includes *two* different approaches to caching:

:ref:`PSR-6 Caching <cache-component-psr6-caching>`:
A fully-featured cache system, which includes cache "pools", more advanced
cache "items", and :ref:`cache tagging for invalidation <cache-component-tags>`.
A fully-featured cache system, which includes cache "pools", more advanced
cache "items", and :ref:`cache tagging for invalidation <cache-component-tags>`.

:ref:`PSR-16 Simple Caching <cache-component-psr16-caching>`:
A simple way to store, fetch and remove items from a cache.
Expand Down
18 changes: 9 additions & 9 deletions components/console/single_command_tool.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ it is possible to remove this need by declaring a single command application::
use Symfony\Component\Console\Output\OutputInterface;

(new Application('echo', '1.0.0'))
->register('echo')
->addArgument('foo', InputArgument::OPTIONAL, 'The directory')
->addOption('bar', null, InputOption::VALUE_REQUIRED)
->setCode(function(InputInterface $input, OutputInterface $output) {
// output arguments and options
})
->getApplication()
->setDefaultCommand('echo', true) // Single command application
->run();
->register('echo')
->addArgument('foo', InputArgument::OPTIONAL, 'The directory')
->addOption('bar', null, InputOption::VALUE_REQUIRED)
->setCode(function(InputInterface $input, OutputInterface $output) {
// output arguments and options
})
->getApplication()
->setDefaultCommand('echo', true) // Single command application
->run();

The method :method:`Symfony\\Component\\Console\\Application::setDefaultCommand`
accepts a boolean as second parameter. If true, the command ``echo`` will then
Expand Down
8 changes: 4 additions & 4 deletions components/phpunit_bridge.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ to register a new `test listener`_ called ``SymfonyTestsListener``:

<!-- http://phpunit.de/manual/6.0/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.0/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.0/phpunit.xsd"
>

<!-- ... -->
Expand Down Expand Up @@ -172,7 +172,7 @@ message, enclosed with ``/``. For example, with:

<!-- http://phpunit.de/manual/6.0/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.0/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.0/phpunit.xsd"
>

<!-- ... -->
Expand Down Expand Up @@ -499,7 +499,7 @@ namespaces in the ``phpunit.xml`` file, as done for example in the

<!-- http://phpunit.de/manual/4.1/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.1/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.1/phpunit.xsd"
>

<!-- ... -->
Expand Down Expand Up @@ -643,7 +643,7 @@ Add the following configuration to the ``phpunit.xml.dist`` file:

<!-- http://phpunit.de/manual/6.0/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.0/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.0/phpunit.xsd"
>

<!-- ... -->
Expand Down
2 changes: 1 addition & 1 deletion components/translation/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ 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">
srcLang="fr-FR" trgLang="en-US">
<file id="messages.en_US">
<unit id="LCa0a2j">
<notes>
Expand Down
12 changes: 6 additions & 6 deletions components/var_dumper/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ you can configure these limits:
items. Specifying ``-1`` removes the limit.

:method:`Symfony\\Component\\VarDumper\\Cloner\\VarCloner::setMinDepth`
.. versionadded:: 3.4

The ``setMinDepth()`` method was introduced in Symfony 3.4.

Configures the minimum tree depth where we are guaranteed to clone
all the items. After this depth is reached, only ``setMaxItems``
items will be cloned. The default value is ``1``, which is consistent
with older Symfony versions.

.. versionadded:: 3.4

The ``setMinDepth()`` method was introduced in Symfony 3.4.

:method:`Symfony\\Component\\VarDumper\\Cloner\\VarCloner::setMaxString`
Configures the maximum number of characters that will be cloned before
cutting overlong strings. Specifying ``-1`` removes the limit.
Expand All @@ -85,12 +85,12 @@ Before dumping it, you can further limit the resulting
Removes internal objects' handles for sparser output (useful for tests).

:method:`Symfony\\Component\\VarDumper\\Cloner\\Data::seek`
Selects only subparts of already cloned arrays, objects or resources.

.. versionadded:: 3.2

The ``seek()`` method was introduced in Symfony 3.2.

Selects only subparts of already cloned arrays, objects or resources.

Unlike the previous limits on cloners that remove data on purpose, these can
be changed back and forth before dumping since they do not affect the
intermediate representation internally.
Expand Down
4 changes: 2 additions & 2 deletions components/web_link.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
The WebLink Component
======================

The WebLink component provides tools to manage the ``Link`` HTTP header needed
for `Web Linking`_ when using `HTTP/2 Server Push`_ as well as `Resource Hints`_.
The WebLink component provides tools to manage the ``Link`` HTTP header needed
for `Web Linking`_ when using `HTTP/2 Server Push`_ as well as `Resource Hints`_.

Installation
------------
Expand Down
4 changes: 2 additions & 2 deletions console/input.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ flag:

.. tip::

You can also declare a one-letter shortcut that you can call with a single
dash, like ``-i``::
You can also declare a one-letter shortcut that you can call with a single
dash, like ``-i``::

$this
// ...
Expand Down
18 changes: 9 additions & 9 deletions contributing/documentation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ These short articles explain everything you need to contribute to the Symfony
documentation:

:doc:`The Contribution Process </contributing/documentation/overview>`
Explains the steps to follow to contribute fixes and new contents. It's the
same contribution process followed by most open source projects, so you may
already know everything that is needed.
Explains the steps to follow to contribute fixes and new contents. It's the
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The result is the same and we should use 4 spaces for indention whenever we can

same contribution process followed by most open source projects, so you may
already know everything that is needed.

:doc:`Documentation Formats </contributing/documentation/format>`
Explains the technical details of the reStructuredText format that is used to
write the docs. Skip it if you are already familiar with this format.
Explains the technical details of the reStructuredText format that is used to
write the docs. Skip it if you are already familiar with this format.

:doc:`Documentation Standards </contributing/documentation/standards>`
Explains how to write docs and code examples to match the style and tone of
the rest of the existing documentation.
Explains how to write docs and code examples to match the style and tone of
the rest of the existing documentation.

:doc:`License </contributing/documentation/license>`
Explains the details of the Creative Commons BY-SA 3.0 license used for the
Symfony Documentation.
Explains the details of the Creative Commons BY-SA 3.0 license used for the
Symfony Documentation.

.. toctree::
:hidden:
Expand Down
12 changes: 6 additions & 6 deletions create_framework/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,23 +93,23 @@ The ``match()`` method takes a request path and returns an array of attributes
(notice that the matched route is automatically stored under the special
``_route`` attribute)::

print_r($matcher->match('/bye'));
/* Gives:
$matcher->match('/bye');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the print_r is not needed here

/* Result:
[
'_route' => 'bye',
];
*/

print_r($matcher->match('/hello/Fabien'));
/* Gives:
$matcher->match('/hello/Fabien');
/* Result:
[
'name' => 'Fabien',
'_route' => 'hello',
];
*/

print_r($matcher->match('/hello'));
/* Gives:
$matcher->match('/hello');
/* Result:
[
'name' => 'World',
'_route' => 'hello',
Expand Down
52 changes: 26 additions & 26 deletions deployment/azure-website.rst
Original file line number Diff line number Diff line change
Expand Up @@ -404,32 +404,32 @@ application, configure it with the following content:
.. code-block:: xml

<configuration>
<system.webServer>
<rewrite>
<rules>
<clear/>
<rule name="BlockAccessToPublic" patternSyntax="Wildcard" stopProcessing="true">
<match url="*"/>
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{URL}" pattern="/web/*"/>
</conditions>
<action type="CustomResponse" statusCode="403" statusReason="Forbidden: Access is denied." statusDescription="You do not have permission to view this directory or page using the credentials that you supplied."/>
</rule>
<rule name="RewriteAssetsToPublic" stopProcessing="true">
<match url="^(.*)(\.css|\.js|\.jpg|\.png|\.gif|\.ico)$"/>
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
</conditions>
<action type="Rewrite" url="web/{R:0}"/>
</rule>
<rule name="RewriteRequestsToPublic" stopProcessing="true">
<match url="^(.*)$"/>
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
</conditions>
<action type="Rewrite" url="web/app.php/{R:0}"/>
</rule>
</rules>
</rewrite>
</system.webServer>
<system.webServer>
<rewrite>
<rules>
<clear/>
<rule name="BlockAccessToPublic" patternSyntax="Wildcard" stopProcessing="true">
<match url="*"/>
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{URL}" pattern="/web/*"/>
</conditions>
<action type="CustomResponse" statusCode="403" statusReason="Forbidden: Access is denied." statusDescription="You do not have permission to view this directory or page using the credentials that you supplied."/>
</rule>
<rule name="RewriteAssetsToPublic" stopProcessing="true">
<match url="^(.*)(\.css|\.js|\.jpg|\.png|\.gif|\.ico)$"/>
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
</conditions>
<action type="Rewrite" url="web/{R:0}"/>
</rule>
<rule name="RewriteRequestsToPublic" stopProcessing="true">
<match url="^(.*)$"/>
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
</conditions>
<action type="Rewrite" url="web/app.php/{R:0}"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

As you can see, the latest rule ``RewriteRequestsToPublic`` is responsible for
Expand Down
4 changes: 2 additions & 2 deletions deployment/fortrabbit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ Commit and push

.. note::

The first ``git push`` takes much longer as all composer dependencies get
downloaded. All subsequent deploys are done within seconds.
The first ``git push`` takes much longer as all composer dependencies get
downloaded. All subsequent deploys are done within seconds.

That's it! Your application is being deployed on fortrabbit. More information
about `database migrations and tunneling`_ can be found in the fortrabbit
Expand Down
10 changes: 5 additions & 5 deletions deployment/platformsh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Platform.sh how to deploy your application (read more about
# The type of the application to build.
type: php:5.6
build:
flavor: composer
flavor: composer

# The relationships of the application with services or other applications.
# The left-hand side is the name of the relationship as it will be exposed
Expand Down Expand Up @@ -68,10 +68,10 @@ Platform.sh how to deploy your application (read more about
# The hooks that will be performed when the package is deployed.
hooks:
build: |
rm web/app_dev.php
php bin/console --env=prod assetic:dump --no-debug
rm web/app_dev.php
php bin/console --env=prod assetic:dump --no-debug
deploy: |
php bin/console --env=prod cache:clear
php bin/console --env=prod cache:clear

For best practices, you should also add a ``.platform`` folder at the root of
your Git repository which contains the following files:
Expand Down Expand Up @@ -111,7 +111,7 @@ following file (it's your role to add this file to your code base)::

foreach ($relationships['database'] as $endpoint) {
if (empty($endpoint['query']['is_master'])) {
continue;
continue;
}

$container->setParameter('database_driver', 'pdo_' . $endpoint['scheme']);
Expand Down
21 changes: 12 additions & 9 deletions doctrine/reverse_engineering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,18 @@ The generated ``BlogPost.orm.xml`` metadata file looks as follows:
.. code-block:: xml

<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="AppBundle\Entity\BlogPost" table="blog_post">
<id name="id" type="bigint" column="id">
<generator strategy="IDENTITY"/>
</id>
<field name="title" type="string" column="title" length="100" nullable="false"/>
<field name="content" type="text" column="content" nullable="false"/>
<field name="createdAt" type="datetime" column="created_at" nullable="false"/>
</entity>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping
https://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="AppBundle\Entity\BlogPost" table="blog_post">
<id name="id" type="bigint" column="id">
<generator strategy="IDENTITY"/>
</id>
<field name="title" type="string" column="title" length="100" nullable="false"/>
<field name="content" type="text" column="content" nullable="false"/>
<field name="createdAt" type="datetime" column="created_at" nullable="false"/>
</entity>
</doctrine-mapping>

Once the metadata files are generated, you can ask Doctrine to build related
Expand Down
4 changes: 2 additions & 2 deletions forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,8 @@ the correct values of a number of field options.

.. caution::

These field options are *only* guessed if you're using Symfony to guess
the field type (i.e. omit or pass ``null`` as the second argument to ``add()``).
These field options are *only* guessed if you're using Symfony to guess
the field type (i.e. omit or pass ``null`` as the second argument to ``add()``).

If you'd like to change one of the guessed values, you can override it by
passing the option in the options field array::
Expand Down
12 changes: 6 additions & 6 deletions frontend/assetic/php.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ First, configure a new ``scssphp`` Assetic filter:
// app/config/config.php
$container->loadFromExtension('assetic', [
'filters' => [
'scssphp' => [
'formatter' => 'Leafo\ScssPhp\Formatter\Compressed',
],
// ...
'scssphp' => [
'formatter' => 'Leafo\ScssPhp\Formatter\Compressed',
],
// ...
],
]);

Expand Down Expand Up @@ -181,8 +181,8 @@ First, configure a new ``jsqueeze`` Assetic filter as follows:
// app/config/config.php
$container->loadFromExtension('assetic', [
'filters' => [
'jsqueeze' => null,
// ...
'jsqueeze' => null,
// ...
],
]);

Expand Down
4 changes: 2 additions & 2 deletions reference/configuration/debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ destination for dumps. Typically, you would set this to ``php://stderr``:

# app/config/config.yml
debug:
dump_destination: php://stderr
dump_destination: php://stderr

.. code-block:: xml

Expand All @@ -99,5 +99,5 @@ destination for dumps. Typically, you would set this to ``php://stderr``:

// app/config/config.php
$container->loadFromExtension('debug', [
'dump_destination' => 'php://stderr',
'dump_destination' => 'php://stderr',
]);
Loading