Skip to content

Fixed indentation errors #8898

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

Closed
wants to merge 1 commit into from
Closed
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
18 changes: 9 additions & 9 deletions bundles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ are used by your application (including the core Symfony bundles).

.. tip::

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

Creating a Bundle
-----------------
Expand Down Expand Up @@ -91,10 +91,10 @@ called ``AcmeTestBundle.php``::

.. tip::

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

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

.. tip::

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

Bundle Directory Structure
--------------------------
Expand Down
32 changes: 16 additions & 16 deletions bundles/best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,21 +116,21 @@ The following classes and files have specific emplacements (some are mandatory
and others are just conventions followed by most developers):

=================================================== ========================================
Type Directory
Type Directory
=================================================== ========================================
Commands ``Command/``
Controllers ``Controller/``
Service Container Extensions ``DependencyInjection/``
Commands ``Command/``
Controllers ``Controller/``
Service Container Extensions ``DependencyInjection/``
Doctrine ORM entities (when not using annotations) ``Entity/``
Doctrine ODM documents (when not using annotations) ``Document/``
Event Listeners ``EventListener/``
Configuration ``Resources/config/``
Web Resources (CSS, JS, images) ``Resources/public/``
Translation files ``Resources/translations/``
Event Listeners ``EventListener/``
Configuration ``Resources/config/``
Web Resources (CSS, JS, images) ``Resources/public/``
Translation files ``Resources/translations/``
Validation (when not using annotations) ``Resources/config/validation/``
Serialization (when not using annotations) ``Resources/config/serialization/``
Templates ``Resources/views/``
Unit and Functional Tests ``Tests/``
Templates ``Resources/views/``
Unit and Functional Tests ``Tests/``
=================================================== ========================================

Classes
Expand Down Expand Up @@ -174,19 +174,19 @@ the ``Tests/`` directory. Tests should follow the following principles:

.. note::

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

Documentation
-------------

All classes and functions must come with full PHPDoc.

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

Expand Down
8 changes: 4 additions & 4 deletions bundles/inheritance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ The same goes for routing files and some other resources.

.. caution::

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

.. _`FOSUserBundle`: https://github.com/friendsofsymfony/fosuserbundle
4 changes: 2 additions & 2 deletions components/asset.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
The Asset Component
===================

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

.. versionadded:: 2.7
The Asset component was introduced in Symfony 2.7.
Expand Down
12 changes: 6 additions & 6 deletions components/event_dispatcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -405,14 +405,14 @@ the dispatcher to stop all propagation of the event to future listeners
inside a listener via the
:method:`Symfony\\Component\\EventDispatcher\\Event::stopPropagation` method::

use Acme\Store\Event\OrderPlacedEvent;
use Acme\Store\Event\OrderPlacedEvent;

public function onStoreOrder(OrderPlacedEvent $event)
{
// ...
public function onStoreOrder(OrderPlacedEvent $event)
{
// ...

$event->stopPropagation();
}
$event->stopPropagation();
}

Now, any listeners to ``order.placed`` that have not yet been called will
*not* be called.
Expand Down
4 changes: 2 additions & 2 deletions components/finder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
The Finder Component
====================

The Finder component finds files and directories via an intuitive fluent
interface.
The Finder component finds files and directories via an intuitive fluent
interface.

Installation
------------
Expand Down
10 changes: 5 additions & 5 deletions components/process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,12 @@ Process Idle Timeout
In contrast to the timeout of the previous paragraph, the idle timeout only
considers the time since the last output was produced by the process::

use Symfony\Component\Process\Process;
use Symfony\Component\Process\Process;

$process = new Process('something-with-variable-runtime');
$process->setTimeout(3600);
$process->setIdleTimeout(60);
$process->run();
$process = new Process('something-with-variable-runtime');
$process->setTimeout(3600);
$process->setIdleTimeout(60);
$process->run();

In the case above, a process is considered timed out, when either the total runtime
exceeds 3600 seconds, or the process does not produce any output for 60 seconds.
Expand Down
48 changes: 24 additions & 24 deletions components/routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
The Routing Component
=====================

The Routing component maps an HTTP request to a set of configuration
variables.
The Routing component maps an HTTP request to a set of configuration
variables.

Installation
------------
Expand Down Expand Up @@ -100,28 +100,28 @@ A full route definition can contain up to seven parts:

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

$route = new Route(
'/archive/{month}', // path
array('_controller' => 'showArchive'), // default values
array('month' => '[0-9]{4}-[0-9]{2}', 'subdomain' => 'www|m'), // requirements
array(), // options
'{subdomain}.example.com', // host
array(), // schemes
array() // methods
);

// ...

$parameters = $matcher->match('/archive/2012-01');
// array(
// '_controller' => 'showArchive',
// 'month' => '2012-01',
// 'subdomain' => 'www',
// '_route' => ...
// )

$parameters = $matcher->match('/archive/foo');
// throws ResourceNotFoundException
$route = new Route(
'/archive/{month}', // path
array('_controller' => 'showArchive'), // default values
array('month' => '[0-9]{4}-[0-9]{2}', 'subdomain' => 'www|m'), // requirements
array(), // options
'{subdomain}.example.com', // host
array(), // schemes
array() // methods
);

// ...

$parameters = $matcher->match('/archive/2012-01');
// array(
// '_controller' => 'showArchive',
// 'month' => '2012-01',
// 'subdomain' => 'www',
// '_route' => ...
// )

$parameters = $matcher->match('/archive/foo');
// throws ResourceNotFoundException

In this case, the route is matched by ``/archive/2012-01``, because the ``{month}``
wildcard matches the regular expression wildcard given. However, ``/archive/foo``
Expand Down
6 changes: 3 additions & 3 deletions components/serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
The Serializer Component
========================

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

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

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

Installation
Expand Down
28 changes: 14 additions & 14 deletions components/templating/assetshelper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ generating asset paths:

.. code-block:: html+php

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

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

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

.. code-block:: html+php

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

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

.. code-block:: html+php

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

.. note::

Expand Down Expand Up @@ -82,10 +82,10 @@ fourth argument of the helper:

.. code-block:: html+php

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

Multiple Packages
-----------------
Expand Down
4 changes: 2 additions & 2 deletions configuration/apache_router.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ it should look like this:

.. note::

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

That's it!
You're now all set to use Apache routes.
Expand Down
14 changes: 7 additions & 7 deletions configuration/environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ Either way: *one of these two files is always executed*.

.. note::

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

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

.. note::

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

.. index::
single: Configuration; Debug mode
Expand Down
30 changes: 15 additions & 15 deletions console/request_context.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@ Configuring the Request Context per Command
To change it only in one command you can simply fetch the Request Context
from the ``router`` service and override its settings::

// src/AppBundle/Command/DemoCommand.php

// ...
class DemoCommand extends ContainerAwareCommand
{
protected function execute(InputInterface $input, OutputInterface $output)
{
$context = $this->getContainer()->get('router')->getContext();
$context->setHost('example.com');
$context->setScheme('https');
$context->setBaseUrl('my/path');

// ... your code here
}
}
// src/AppBundle/Command/DemoCommand.php

// ...
class DemoCommand extends ContainerAwareCommand
{
protected function execute(InputInterface $input, OutputInterface $output)
{
$context = $this->getContainer()->get('router')->getContext();
$context->setHost('example.com');
$context->setScheme('https');
$context->setBaseUrl('my/path');

// ... your code here
}
}
6 changes: 3 additions & 3 deletions contributing/code/patches.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ software:

.. caution::

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

Configure Git
~~~~~~~~~~~~~
Expand Down
Loading