Skip to content

Commit 61d2f98

Browse files
committed
minor #8898 Fixed indentation errors (javiereguiluz)
This PR was merged into the 2.7 branch. Discussion ---------- Fixed indentation errors Indentation must be always multiple of 4 white spaces, except in the `.. index::` directive, the `.. versionadded::` directive and the list items. Commits ------- 5062af8 Fixed indentation errors
2 parents c60a234 + 5062af8 commit 61d2f98

29 files changed

+207
-207
lines changed

bundles.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ are used by your application (including the core Symfony bundles).
5959

6060
.. tip::
6161

62-
A bundle can live *anywhere* as long as it can be autoloaded (via the
63-
autoloader configured at ``app/autoload.php``).
62+
A bundle can live *anywhere* as long as it can be autoloaded (via the
63+
autoloader configured at ``app/autoload.php``).
6464

6565
Creating a Bundle
6666
-----------------
@@ -91,10 +91,10 @@ called ``AcmeTestBundle.php``::
9191

9292
.. tip::
9393

94-
The name AcmeTestBundle follows the standard
95-
:ref:`Bundle naming conventions <bundles-naming-conventions>`. You could
96-
also choose to shorten the name of the bundle to simply TestBundle by naming
97-
this class TestBundle (and naming the file ``TestBundle.php``).
94+
The name AcmeTestBundle follows the standard
95+
:ref:`Bundle naming conventions <bundles-naming-conventions>`. You could
96+
also choose to shorten the name of the bundle to simply TestBundle by naming
97+
this class TestBundle (and naming the file ``TestBundle.php``).
9898

9999
This empty class is the only piece you need to create the new bundle. Though
100100
commonly empty, this class is powerful and can be used to customize the behavior
@@ -130,9 +130,9 @@ tools later.
130130

131131
.. tip::
132132

133-
Whenever creating a new bundle or using a third-party bundle, always make
134-
sure the bundle has been enabled in ``registerBundles()``. When using
135-
the ``generate:bundle`` command, this is done for you.
133+
Whenever creating a new bundle or using a third-party bundle, always make
134+
sure the bundle has been enabled in ``registerBundles()``. When using
135+
the ``generate:bundle`` command, this is done for you.
136136

137137
Bundle Directory Structure
138138
--------------------------

bundles/best_practices.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -116,21 +116,21 @@ The following classes and files have specific emplacements (some are mandatory
116116
and others are just conventions followed by most developers):
117117

118118
=================================================== ========================================
119-
Type Directory
119+
Type Directory
120120
=================================================== ========================================
121-
Commands ``Command/``
122-
Controllers ``Controller/``
123-
Service Container Extensions ``DependencyInjection/``
121+
Commands ``Command/``
122+
Controllers ``Controller/``
123+
Service Container Extensions ``DependencyInjection/``
124124
Doctrine ORM entities (when not using annotations) ``Entity/``
125125
Doctrine ODM documents (when not using annotations) ``Document/``
126-
Event Listeners ``EventListener/``
127-
Configuration ``Resources/config/``
128-
Web Resources (CSS, JS, images) ``Resources/public/``
129-
Translation files ``Resources/translations/``
126+
Event Listeners ``EventListener/``
127+
Configuration ``Resources/config/``
128+
Web Resources (CSS, JS, images) ``Resources/public/``
129+
Translation files ``Resources/translations/``
130130
Validation (when not using annotations) ``Resources/config/validation/``
131131
Serialization (when not using annotations) ``Resources/config/serialization/``
132-
Templates ``Resources/views/``
133-
Unit and Functional Tests ``Tests/``
132+
Templates ``Resources/views/``
133+
Unit and Functional Tests ``Tests/``
134134
=================================================== ========================================
135135

136136
Classes
@@ -174,19 +174,19 @@ the ``Tests/`` directory. Tests should follow the following principles:
174174

175175
.. note::
176176

177-
A test suite must not contain ``AllTests.php`` scripts, but must rely on the
178-
existence of a ``phpunit.xml.dist`` file.
177+
A test suite must not contain ``AllTests.php`` scripts, but must rely on the
178+
existence of a ``phpunit.xml.dist`` file.
179179

180180
Documentation
181181
-------------
182182

183183
All classes and functions must come with full PHPDoc.
184184

185-
Extensive documentation should also be provided in the ``Resources/doc/``
185+
Extensive documentation should also be provided in the ``Resources/doc/``
186186
directory.
187-
The index file (for example ``Resources/doc/index.rst`` or
188-
``Resources/doc/index.md``) is the only mandatory file and must be the entry
189-
point for the documentation. The
187+
The index file (for example ``Resources/doc/index.rst`` or
188+
``Resources/doc/index.md``) is the only mandatory file and must be the entry
189+
point for the documentation. The
190190
:doc:`reStructuredText (rST) </contributing/documentation/format>` is the format
191191
used to render the documentation on symfony.com.
192192

bundles/inheritance.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ The same goes for routing files and some other resources.
9999

100100
.. caution::
101101

102-
Translation and validation files do not work in the same way as described
103-
above. Read ":ref:`override-translations`" if you want to learn how to
104-
override translations and see ":ref:`override-validation`" for tricks to
105-
override the validation.
102+
Translation and validation files do not work in the same way as described
103+
above. Read ":ref:`override-translations`" if you want to learn how to
104+
override translations and see ":ref:`override-validation`" for tricks to
105+
override the validation.
106106

107107
.. _`FOSUserBundle`: https://github.com/friendsofsymfony/fosuserbundle

components/asset.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
The Asset Component
66
===================
77

8-
The Asset component manages URL generation and versioning of web assets such
9-
as CSS stylesheets, JavaScript files and image files.
8+
The Asset component manages URL generation and versioning of web assets such
9+
as CSS stylesheets, JavaScript files and image files.
1010

1111
.. versionadded:: 2.7
1212
The Asset component was introduced in Symfony 2.7.

components/event_dispatcher.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -405,14 +405,14 @@ the dispatcher to stop all propagation of the event to future listeners
405405
inside a listener via the
406406
:method:`Symfony\\Component\\EventDispatcher\\Event::stopPropagation` method::
407407

408-
use Acme\Store\Event\OrderPlacedEvent;
408+
use Acme\Store\Event\OrderPlacedEvent;
409409

410-
public function onStoreOrder(OrderPlacedEvent $event)
411-
{
412-
// ...
410+
public function onStoreOrder(OrderPlacedEvent $event)
411+
{
412+
// ...
413413

414-
$event->stopPropagation();
415-
}
414+
$event->stopPropagation();
415+
}
416416

417417
Now, any listeners to ``order.placed`` that have not yet been called will
418418
*not* be called.

components/finder.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
The Finder Component
66
====================
77

8-
The Finder component finds files and directories via an intuitive fluent
9-
interface.
8+
The Finder component finds files and directories via an intuitive fluent
9+
interface.
1010

1111
Installation
1212
------------

components/process.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,12 @@ Process Idle Timeout
267267
In contrast to the timeout of the previous paragraph, the idle timeout only
268268
considers the time since the last output was produced by the process::
269269

270-
use Symfony\Component\Process\Process;
270+
use Symfony\Component\Process\Process;
271271

272-
$process = new Process('something-with-variable-runtime');
273-
$process->setTimeout(3600);
274-
$process->setIdleTimeout(60);
275-
$process->run();
272+
$process = new Process('something-with-variable-runtime');
273+
$process->setTimeout(3600);
274+
$process->setIdleTimeout(60);
275+
$process->run();
276276

277277
In the case above, a process is considered timed out, when either the total runtime
278278
exceeds 3600 seconds, or the process does not produce any output for 60 seconds.

components/routing.rst

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
The Routing Component
66
=====================
77

8-
The Routing component maps an HTTP request to a set of configuration
9-
variables.
8+
The Routing component maps an HTTP request to a set of configuration
9+
variables.
1010

1111
Installation
1212
------------
@@ -100,28 +100,28 @@ A full route definition can contain up to seven parts:
100100

101101
Take the following route, which combines several of these ideas::
102102

103-
$route = new Route(
104-
'/archive/{month}', // path
105-
array('_controller' => 'showArchive'), // default values
106-
array('month' => '[0-9]{4}-[0-9]{2}', 'subdomain' => 'www|m'), // requirements
107-
array(), // options
108-
'{subdomain}.example.com', // host
109-
array(), // schemes
110-
array() // methods
111-
);
112-
113-
// ...
114-
115-
$parameters = $matcher->match('/archive/2012-01');
116-
// array(
117-
// '_controller' => 'showArchive',
118-
// 'month' => '2012-01',
119-
// 'subdomain' => 'www',
120-
// '_route' => ...
121-
// )
122-
123-
$parameters = $matcher->match('/archive/foo');
124-
// throws ResourceNotFoundException
103+
$route = new Route(
104+
'/archive/{month}', // path
105+
array('_controller' => 'showArchive'), // default values
106+
array('month' => '[0-9]{4}-[0-9]{2}', 'subdomain' => 'www|m'), // requirements
107+
array(), // options
108+
'{subdomain}.example.com', // host
109+
array(), // schemes
110+
array() // methods
111+
);
112+
113+
// ...
114+
115+
$parameters = $matcher->match('/archive/2012-01');
116+
// array(
117+
// '_controller' => 'showArchive',
118+
// 'month' => '2012-01',
119+
// 'subdomain' => 'www',
120+
// '_route' => ...
121+
// )
122+
123+
$parameters = $matcher->match('/archive/foo');
124+
// throws ResourceNotFoundException
125125

126126
In this case, the route is matched by ``/archive/2012-01``, because the ``{month}``
127127
wildcard matches the regular expression wildcard given. However, ``/archive/foo``

components/serializer.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
The Serializer Component
66
========================
77

8-
The Serializer component is meant to be used to turn objects into a
9-
specific format (XML, JSON, YAML, ...) and the other way around.
8+
The Serializer component is meant to be used to turn objects into a
9+
specific format (XML, JSON, YAML, ...) and the other way around.
1010

1111
In order to do so, the Serializer component follows the following
1212
simple schema.
@@ -21,7 +21,7 @@ the middle. This way, Encoders will only deal with turning specific
2121
**formats** into **arrays** and vice versa. The same way, Normalizers
2222
will deal with turning specific **objects** into **arrays** and vice versa.
2323

24-
Serialization is a complex topic. This component may not cover all your use cases out of the box,
24+
Serialization is a complex topic. This component may not cover all your use cases out of the box,
2525
but it can be useful for developing tools to serialize and deserialize your objects.
2626

2727
Installation

components/templating/assetshelper.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ generating asset paths:
99

1010
.. code-block:: html+php
1111

12-
<link href="<?php echo $view['assets']->getUrl('css/style.css') ?>" rel="stylesheet">
12+
<link href="<?php echo $view['assets']->getUrl('css/style.css') ?>" rel="stylesheet">
1313

14-
<img src="<?php echo $view['assets']->getUrl('images/logo.png') ?>">
14+
<img src="<?php echo $view['assets']->getUrl('images/logo.png') ?>">
1515

1616
The assets helper can then be configured to render paths to a CDN or modify
1717
the paths in case your assets live in a sub-directory of your host (e.g. ``http://example.com/app``).
@@ -32,10 +32,10 @@ Now, if you use the helper, everything will be prefixed with ``/foo/bar``:
3232

3333
.. code-block:: html+php
3434

35-
<img src="<?php echo $view['assets']->getUrl('images/logo.png') ?>">
36-
<!-- renders as:
37-
<img src="/foo/bar/images/logo.png">
38-
-->
35+
<img src="<?php echo $view['assets']->getUrl('images/logo.png') ?>">
36+
<!-- renders as:
37+
<img src="/foo/bar/images/logo.png">
38+
-->
3939

4040
Absolute Urls
4141
-------------
@@ -51,10 +51,10 @@ You can also use the third argument of the helper to force an absolute URL:
5151

5252
.. code-block:: html+php
5353

54-
<img src="<?php echo $view['assets']->getUrl('images/logo.png', null, true) ?>">
55-
<!-- renders as:
56-
<img src="http://yourwebsite.com/foo/bar/images/logo.png">
57-
-->
54+
<img src="<?php echo $view['assets']->getUrl('images/logo.png', null, true) ?>">
55+
<!-- renders as:
56+
<img src="http://yourwebsite.com/foo/bar/images/logo.png">
57+
-->
5858

5959
.. note::
6060

@@ -82,10 +82,10 @@ fourth argument of the helper:
8282

8383
.. code-block:: html+php
8484

85-
<img src="<?php echo $view['assets']->getUrl('images/logo.png', null, false, '3.0') ?>">
86-
<!-- renders as:
87-
<img src="/images/logo.png?v=3.0">
88-
-->
85+
<img src="<?php echo $view['assets']->getUrl('images/logo.png', null, false, '3.0') ?>">
86+
<!-- renders as:
87+
<img src="/images/logo.png?v=3.0">
88+
-->
8989

9090
Multiple Packages
9191
-----------------

configuration/apache_router.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ it should look like this:
129129
130130
.. note::
131131

132-
The procedure above should be done each time you add/change a route if you
133-
want to take full advantage of this setup.
132+
The procedure above should be done each time you add/change a route if you
133+
want to take full advantage of this setup.
134134

135135
That's it!
136136
You're now all set to use Apache routes.

configuration/environments.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ Either way: *one of these two files is always executed*.
166166

167167
.. note::
168168

169-
The given URLs assume that your web server is configured to use the ``web/``
170-
directory of the application as its root. Read more in
171-
:doc:`Installing Symfony </setup>`.
169+
The given URLs assume that your web server is configured to use the ``web/``
170+
directory of the application as its root. Read more in
171+
:doc:`Installing Symfony </setup>`.
172172

173173
If you open up one of these files, you'll quickly see that the environment
174174
used by each is explicitly set::
@@ -186,10 +186,10 @@ this code and changing the environment string.
186186

187187
.. note::
188188

189-
The ``test`` environment is used when writing functional tests and is
190-
not accessible in the browser directly via a front controller. In other
191-
words, unlike the other environments, there is no ``app_test.php`` front
192-
controller file.
189+
The ``test`` environment is used when writing functional tests and is
190+
not accessible in the browser directly via a front controller. In other
191+
words, unlike the other environments, there is no ``app_test.php`` front
192+
controller file.
193193

194194
.. index::
195195
single: Configuration; Debug mode

console/request_context.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,18 @@ Configuring the Request Context per Command
6565
To change it only in one command you can simply fetch the Request Context
6666
from the ``router`` service and override its settings::
6767

68-
// src/AppBundle/Command/DemoCommand.php
69-
70-
// ...
71-
class DemoCommand extends ContainerAwareCommand
72-
{
73-
protected function execute(InputInterface $input, OutputInterface $output)
74-
{
75-
$context = $this->getContainer()->get('router')->getContext();
76-
$context->setHost('example.com');
77-
$context->setScheme('https');
78-
$context->setBaseUrl('my/path');
79-
80-
// ... your code here
81-
}
82-
}
68+
// src/AppBundle/Command/DemoCommand.php
69+
70+
// ...
71+
class DemoCommand extends ContainerAwareCommand
72+
{
73+
protected function execute(InputInterface $input, OutputInterface $output)
74+
{
75+
$context = $this->getContainer()->get('router')->getContext();
76+
$context->setHost('example.com');
77+
$context->setScheme('https');
78+
$context->setBaseUrl('my/path');
79+
80+
// ... your code here
81+
}
82+
}

contributing/code/patches.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ software:
1818

1919
.. caution::
2020

21-
Before Symfony 2.7, the minimal PHP version was 5.3.3. Please keep
22-
this in mind, if you are working on a bug fix for earlier versions
23-
of Symfony.
21+
Before Symfony 2.7, the minimal PHP version was 5.3.3. Please keep
22+
this in mind, if you are working on a bug fix for earlier versions
23+
of Symfony.
2424

2525
Configure Git
2626
~~~~~~~~~~~~~

0 commit comments

Comments
 (0)