Skip to content

Commit bfad418

Browse files
committed
Removed trailing whitespace
1 parent 1f3a687 commit bfad418

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+228
-228
lines changed

book/doctrine.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ information. By convention, this information is usually configured in an
9191
</doctrine:config>
9292
9393
.. code-block:: php
94-
94+
9595
// app/config/config.php
9696
$configuration->loadFromExtension('doctrine', array(
9797
'dbal' => array(

book/forms.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -1610,7 +1610,7 @@ but here's a short example:
16101610
The ``constraints`` option, which accepts a single constraint or an array
16111611
of constraints (before 2.1, the option was called ``validation_constraint``,
16121612
and only accepted a single constraint) is new to Symfony 2.1.
1613-
1613+
16141614
.. code-block:: php
16151615
16161616
use Symfony\Component\Validator\Constraints\Length;
@@ -1630,15 +1630,15 @@ but here's a short example:
16301630
16311631
.. tip::
16321632

1633-
If you are using Validation Groups, you need to either reference the
1634-
``Default`` group when creating the form, or set the correct group on
1633+
If you are using Validation Groups, you need to either reference the
1634+
``Default`` group when creating the form, or set the correct group on
16351635
the constraint you are adding.
1636-
1636+
16371637
.. code-block:: php
16381638
16391639
new NotBlank(array('groups' => array('create', 'update'))
1640-
1641-
1640+
1641+
16421642
Final Thoughts
16431643
--------------
16441644

book/from_flat_php_to_symfony2.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,8 @@ Add a Touch of Symfony2
422422

423423
Symfony2 to the rescue. Before actually using Symfony2, you need to download
424424
it. This can be done by using Composer, which takes care of downloading the
425-
correct version and all its dependencies and provides an autoloader. An
426-
autoloader is a tool that makes it possible to start using PHP classes
425+
correct version and all its dependencies and provides an autoloader. An
426+
autoloader is a tool that makes it possible to start using PHP classes
427427
without explicitly including the file containing the class.
428428

429429
In your root directory, create a ``composer.json`` file with the following
@@ -439,7 +439,7 @@ content:
439439
"files": ["model.php","controllers.php"]
440440
}
441441
}
442-
442+
443443
Next, `download Composer`_ and then run the following command, which will download Symfony
444444
into a vendor/ directory:
445445

@@ -448,7 +448,7 @@ into a vendor/ directory:
448448
$ php composer.phar install
449449
450450
Beside downloading your dependencies, Composer generates a ``vendor/autoload.php`` file,
451-
which takes care of autoloading for all the files in the Symfony Framework as well as
451+
which takes care of autoloading for all the files in the Symfony Framework as well as
452452
the files mentioned in the autoload section of your ``composer.json``.
453453

454454
Core to Symfony's philosophy is the idea that an application's main job is

book/http_fundamentals.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ Stay Organized
358358
~~~~~~~~~~~~~~
359359

360360
Inside your front controller, you have to figure out which code should be
361-
executed and what the content to return should be. To figure this out, you'll
361+
executed and what the content to return should be. To figure this out, you'll
362362
need to check the incoming URI and execute different parts of your code depending
363363
on that value. This can get ugly quickly::
364364

book/installation.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ Symfony itself - into the ``vendor/`` directory.
188188
When running ``php composer.phar install`` or ``php composer.phar update``,
189189
composer will execute post install/update commands to clear the cache
190190
and install assets. By default, the assets will be copied into your ``web``
191-
directory.
191+
directory.
192192

193193
Instead of copying your Symfony assets, you can create symlinks if
194194
your operating system supports it. To create symlinks, add an entry
@@ -239,7 +239,7 @@ If there are any issues, correct them now before moving on.
239239
On a UNIX system, this can be done with one of the following commands:
240240

241241
.. code-block:: bash
242-
242+
243243
$ ps aux | grep httpd
244244
245245
or
@@ -261,7 +261,7 @@ If there are any issues, correct them now before moving on.
261261
262262
$ sudo chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
263263
$ sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
264-
264+
265265
**2. Using Acl on a system that does not support chmod +a**
266266

267267
Some systems don't support ``chmod +a``, but do support another utility
@@ -304,12 +304,12 @@ Symfony2 should welcome and congratulate you for your hard work so far!
304304
.. image:: /images/quick_tour/welcome.png
305305

306306
.. tip::
307-
308-
To get nice and short urls you should point the document root of your
309-
webserver or virtual host to the ``Symfony/web/`` directory. Though
310-
this is not required for development it is recommended at the time your
307+
308+
To get nice and short urls you should point the document root of your
309+
webserver or virtual host to the ``Symfony/web/`` directory. Though
310+
this is not required for development it is recommended at the time your
311311
application goes into production as all system and configuration files
312-
become inaccessible to clients then. For information on configuring
312+
become inaccessible to clients then. For information on configuring
313313
your specific web server document root, read
314314
:doc:`/cookbook/configuration/web_server_configuration`
315315
or consult the official documentation of your webserver:

book/internals.rst

+11-11
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ the Request attributes.
146146
Handling Requests
147147
~~~~~~~~~~~~~~~~~
148148

149-
The :method:`Symfony\\Component\\HttpKernel\\HttpKernel::handle` method
150-
takes a ``Request`` and *always* returns a ``Response``. To convert the
151-
``Request``, ``handle()`` relies on the Resolver and an ordered chain of
152-
Event notifications (see the next section for more information about each
149+
The :method:`Symfony\\Component\\HttpKernel\\HttpKernel::handle` method
150+
takes a ``Request`` and *always* returns a ``Response``. To convert the
151+
``Request``, ``handle()`` relies on the Resolver and an ordered chain of
152+
Event notifications (see the next section for more information about each
153153
Event):
154154

155155
#. Before doing anything else, the ``kernel.request`` event is notified -- if
@@ -209,14 +209,14 @@ Each event thrown by the Kernel is a subclass of
209209
:class:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent`. This means that
210210
each event has access to the same basic information:
211211

212-
* :method:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent::getRequestType`
213-
- returns the *type* of the request (``HttpKernelInterface::MASTER_REQUEST``
212+
* :method:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent::getRequestType`
213+
- returns the *type* of the request (``HttpKernelInterface::MASTER_REQUEST``
214214
or ``HttpKernelInterface::SUB_REQUEST``);
215215

216-
* :method:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent::getKernel`
216+
* :method:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent::getKernel`
217217
- returns the Kernel handling the request;
218218

219-
* :method:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent::getRequest`
219+
* :method:`Symfony\\Component\\HttpKernel\\Event\\KernelEvent::getRequest`
220220
- returns the current ``Request`` being handled.
221221

222222
``getRequestType()``
@@ -513,7 +513,7 @@ HTTP header of the Response::
513513
want to get the token for an Ajax request, use a tool like Firebug to get
514514
the value of the ``X-Debug-Token`` HTTP header.
515515

516-
Use the :method:`Symfony\\Component\\HttpKernel\\Profiler\\Profiler::find`
516+
Use the :method:`Symfony\\Component\\HttpKernel\\Profiler\\Profiler::find`
517517
method to access tokens based on some criteria::
518518

519519
// get the latest 10 tokens
@@ -526,8 +526,8 @@ method to access tokens based on some criteria::
526526
$tokens = $container->get('profiler')->find('127.0.0.1', '', 10);
527527

528528
If you want to manipulate profiling data on a different machine than the one
529-
where the information were generated, use the
530-
:method:`Symfony\\Component\\HttpKernel\\Profiler\\Profiler::export` and
529+
where the information were generated, use the
530+
:method:`Symfony\\Component\\HttpKernel\\Profiler\\Profiler::export` and
531531
:method:`Symfony\\Component\\HttpKernel\\Profiler\\Profiler::import` methods::
532532

533533
// on the production machine

book/page_creation.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,9 @@ You'll learn more about each of these directories in later chapters.
516516

517517
.. sidebar:: Autoloading
518518

519-
When Symfony is loading, a special file - ``vendor/autoload.php`` - is
520-
included. This file is created by Composer and will autoload all
521-
application files living in the `src/` folder as well as all
519+
When Symfony is loading, a special file - ``vendor/autoload.php`` - is
520+
included. This file is created by Composer and will autoload all
521+
application files living in the `src/` folder as well as all
522522
third-party libraries mentioned in the ``composer.json`` file.
523523

524524
Because of the autoloader, you never need to worry about using ``include``

book/service_container.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ looks up the value of each parameter and uses it in the service definition.
255255
256256
.. caution::
257257

258-
You may receive a
258+
You may receive a
259259
:class:`Symfony\\Component\\DependencyInjection\\Exception\\ScopeWideningInjectionException`
260260
when passing the ``request`` service as an argument. To understand this
261261
problem better and learn how to solve it, refer to the cookbook article

book/templating.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ a variable that is trusted and contains markup that should not be escaped.
13461346
Suppose that administrative users are able to write articles that contain
13471347
HTML code. By default, Twig will escape the article body.
13481348

1349-
To render it normally, add the ``raw`` filter:
1349+
To render it normally, add the ``raw`` filter:
13501350

13511351
.. code-block:: jinja
13521352

book/translation.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ via the ``request`` object::
512512
.. index::
513513
single: Translations; Fallback and default locale
514514

515-
It is also possible to store the locale in the session instead of on a per
515+
It is also possible to store the locale in the session instead of on a per
516516
request basis. If you do this, each subsequent request will have this locale.
517517

518518
.. code-block:: php
@@ -556,7 +556,7 @@ by defining a ``default_locale`` for the framework:
556556
557557
.. versionadded:: 2.1
558558
The ``default_locale`` parameter was defined under the session key
559-
originally, however, as of 2.1 this has been moved. This is because the
559+
originally, however, as of 2.1 this has been moved. This is because the
560560
locale is now set on the request instead of the session.
561561

562562
.. _book-translation-locale-url:

components/config/definition.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ you can take advantage of the shortcut
293293
->defaultFalse()
294294
;
295295

296-
The ``canBeDisabled`` method looks about the same except that the section
296+
The ``canBeDisabled`` method looks about the same except that the section
297297
would be enabled by default.
298298

299299
Merging options
@@ -384,7 +384,7 @@ make both of these ``auto_connect``.
384384

385385
.. caution::
386386

387-
The target key will not be altered if it's mixed like
387+
The target key will not be altered if it's mixed like
388388
``foo-bar_moo`` or if it already exists.
389389

390390
Another difference between Yaml and XML is in the way arrays of values may

components/console/helpers/dialoghelper.rst

+25-25
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ helper set, which you can get by calling
1111

1212
$dialog = $this->getHelperSet()->get('dialog');
1313

14-
All the methods inside the Dialog Helper have an
14+
All the methods inside the Dialog Helper have an
1515
:class:`Symfony\\Component\\Console\\Output\\OutputInterface` as first the
1616
argument, the question as the second argument and the default value as last
1717
argument.
1818

1919
Asking the User for confirmation
2020
--------------------------------
2121

22-
Suppose you want to confirm an action before actually executing it. Add
22+
Suppose you want to confirm an action before actually executing it. Add
2323
the following to your command::
2424

2525
// ...
@@ -32,8 +32,8 @@ the following to your command::
3232
}
3333

3434
In this case, the user will be asked "Continue with this action", and will return
35-
``true`` if the user answers with ``y`` or false in any other case. The third
36-
argument to ``askConfirmation`` is the default value to return if the user doesn't
35+
``true`` if the user answers with ``y`` or false in any other case. The third
36+
argument to ``askConfirmation`` is the default value to return if the user doesn't
3737
enter any input.
3838

3939
Asking the User for Information
@@ -82,8 +82,8 @@ Validating the Answer
8282

8383
You can even validate the answer. For instance, in the last example you asked
8484
for the bundle name. Following the Symfony2 naming conventions, it should
85-
be suffixed with ``Bundle``. You can validate that by using the
86-
:method:`Symfony\\Component\\Console\\Helper\\DialogHelper::askAndValidate`
85+
be suffixed with ``Bundle``. You can validate that by using the
86+
:method:`Symfony\\Component\\Console\\Helper\\DialogHelper::askAndValidate`
8787
method::
8888

8989
// ...
@@ -105,16 +105,16 @@ method::
105105
This methods has 2 new arguments, the full signature is::
106106

107107
askAndValidate(
108-
OutputInterface $output,
109-
string|array $question,
110-
callback $validator,
111-
integer $attempts = false,
108+
OutputInterface $output,
109+
string|array $question,
110+
callback $validator,
111+
integer $attempts = false,
112112
string $default = null
113113
)
114114

115115
The ``$validator`` is a callback which handles the validation. It should
116116
throw an exception if there is something wrong. The exception message is displayed
117-
in the console, so it is a good practice to put some useful information in it. The callback
117+
in the console, so it is a good practice to put some useful information in it. The callback
118118
function should also return the value of the user's input if the validation was successful.
119119

120120
You can set the max number of times to ask in the ``$attempts`` argument.
@@ -162,24 +162,24 @@ could use the ``ask`` method described above or, to make sure the user
162162
provided a correct answer, the ``askAndValidate`` method. Both have
163163
the disadvantage that you need to handle incorrect values yourself.
164164

165-
Instead, you can use the
165+
Instead, you can use the
166166
:method:`Symfony\\Component\\Console\\Helper\\DialogHelper::select`
167167
method, which makes sure that the user can only enter a valid string
168168
from a predefined list::
169169

170170
$dialog = $app->getHelperSet()->get('dialog');
171171
$colors = array('red', 'blue', 'yellow');
172-
172+
173173
$color = $dialog->select(
174-
$output,
175-
'Please select your favorite color (default to red)',
176-
$colors,
174+
$output,
175+
'Please select your favorite color (default to red)',
176+
$colors,
177177
0
178178
);
179179
$output->writeln('You have just selected: ' . $colors[$color]);
180-
180+
181181
// ... do something with the color
182-
182+
183183
The option which should be selected by default is provided with the fourth
184184
parameter. The default is ``null``, which means that no option is the default one.
185185

@@ -197,23 +197,23 @@ from the command line, you need to overwrite the HelperSet used by the command::
197197

198198
use Symfony\Component\Console\Helper\DialogHelper;
199199
use Symfony\Component\Console\Helper\HelperSet;
200-
200+
201201
// ...
202202
public function testExecute()
203203
{
204204
// ...
205205
$commandTester = new CommandTester($command);
206-
206+
207207
$dialog = $command->getHelper('dialog');
208-
$dialog->setInputStream($this->getInputStream('Test\n'));
208+
$dialog->setInputStream($this->getInputStream('Test\n'));
209209
// Equals to a user inputing "Test" and hitting ENTER
210210
// If you need to enter a confirmation, "yes\n" will work
211-
211+
212212
$commandTester->execute(array('command' => $command->getName()));
213-
213+
214214
// $this->assertRegExp('/.../', $commandTester->getDisplay());
215215
}
216-
216+
217217
protected function getInputStream($input)
218218
{
219219
$stream = fopen('php://memory', 'r+', false);
@@ -222,7 +222,7 @@ from the command line, you need to overwrite the HelperSet used by the command::
222222

223223
return $stream;
224224
}
225-
225+
226226
By setting the inputStream of the ``DialogHelper``, you imitate what the
227227
console would do internally with all user input through the cli. This way
228228
you can test any user interaction (even complex ones) by passing an appropriate

0 commit comments

Comments
 (0)