Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fc9e351

Browse files
committed
Trailing whitespaces
1 parent 89ab51e commit fc9e351

30 files changed

+127
-127
lines changed

bundles/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ version, include it as the second argument of the `composer require`_ command:
4848
B) Enable the Bundle
4949
--------------------
5050

51-
At this point, the bundle is installed in your Symfony project (e.g.
51+
At this point, the bundle is installed in your Symfony project (e.g.
5252
``vendor/friendsofsymfony/``) and the autoloader recognizes its classes.
5353
The only thing you need to do now is register the bundle in ``AppKernel``::
5454

changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. index::
22
single: CHANGELOG
3-
3+
44
.. !! CAUTION !!
55
This file is automatically generated. Do not add new changelog
66
items when preparing a pull request.

components/console/helpers/questionhelper.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ will be autocompleted as the user types::
174174
{
175175
// ...
176176
$helper = $this->getHelper('question');
177-
177+
178178
$bundles = array('AcmeDemoBundle', 'AcmeBlogBundle', 'AcmeStoreBundle');
179179
$question = new Question('Please enter the name of a bundle', 'FooBundle');
180180
$question->setAutocompleterValues($bundles);
@@ -195,7 +195,7 @@ convenient for passwords::
195195
{
196196
// ...
197197
$helper = $this->getHelper('question');
198-
198+
199199
$question = new Question('What is the database password?');
200200
$question->setHidden(true);
201201
$question->setHiddenFallback(false);
@@ -230,7 +230,7 @@ method::
230230
{
231231
// ...
232232
$helper = $this->getHelper('question');
233-
233+
234234
$question = new Question('Please enter the name of the bundle', 'AppBundle');
235235
$question->setNormalizer(function ($value) {
236236
// $value can be null here

components/dom_crawler.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,13 +339,13 @@ a :class:`Symfony\\Component\\DomCrawler\\Form` object that represents the
339339
form that the button lives in::
340340

341341
// button example: <button id="my-super-button" type="submit">My super button</button>
342-
342+
343343
// you can get button by its label
344344
$form = $crawler->selectButton('My super button')->form();
345-
345+
346346
// or by button id (#my-super-button) if the button doesn't have a label
347347
$form = $crawler->selectButton('my-super-button')->form();
348-
348+
349349
// or you can filter the whole form, for example a form has a class attribute: <form class="form-vertical" method="POST">
350350
$crawler->filter('.form-vertical')->form();
351351

components/expression_language/extending.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ to add custom functions. To do so, you can create a new expression provider by
6464
creating a class that implements
6565
:class:`Symfony\\Component\\ExpressionLanguage\\ExpressionFunctionProviderInterface`.
6666

67-
This interface requires one method:
67+
This interface requires one method:
6868
:method:`Symfony\\Component\\ExpressionLanguage\\ExpressionFunctionProviderInterface::getFunctions`,
6969
which returns an array of expression functions (instances of
7070
:class:`Symfony\\Component\\ExpressionLanguage\\ExpressionFunction`) to

components/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ The Components
44
.. toctree::
55
:maxdepth: 1
66
:glob:
7-
7+
88
using_components
99
*

components/security/authentication.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ firewall map is able to extract the user's credentials from the current
1515
a token, containing these credentials. The next thing the listener should
1616
do is ask the authentication manager to validate the given token, and return
1717
an *authenticated* token if the supplied credentials were found to be valid.
18-
The listener should then store the authenticated token using
18+
The listener should then store the authenticated token using
1919
:class:`the token storage <Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorageInterface>`::
2020

2121
use Symfony\Component\Security\Http\Firewall\ListenerInterface;

components/stopwatch.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ microtime by yourself. Instead, use the simple
3434
$event = $stopwatch->stop('eventName');
3535

3636
The :class:`Symfony\\Component\\Stopwatch\\StopwatchEvent` object can be retrieved
37-
from the :method:`Symfony\\Component\\Stopwatch\\Stopwatch::start`,
38-
:method:`Symfony\\Component\\Stopwatch\\Stopwatch::stop`,
39-
:method:`Symfony\\Component\\Stopwatch\\Stopwatch::lap` and
40-
:method:`Symfony\\Component\\Stopwatch\\Stopwatch::getEvent` methods.
37+
from the :method:`Symfony\\Component\\Stopwatch\\Stopwatch::start`,
38+
:method:`Symfony\\Component\\Stopwatch\\Stopwatch::stop`,
39+
:method:`Symfony\\Component\\Stopwatch\\Stopwatch::lap` and
40+
:method:`Symfony\\Component\\Stopwatch\\Stopwatch::getEvent` methods.
4141
The latter should be used when you need to retrieve the duration of an event
4242
while it is still running.
4343

components/validator/metadata.rst

Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,72 @@
1-
.. index::
2-
single: Validator; Metadata
3-
4-
Metadata
5-
========
6-
7-
The :class:`Symfony\\Component\\Validator\\Mapping\\ClassMetadata` class
8-
represents and manages all the configured constraints on a given class.
9-
10-
Properties
11-
----------
12-
13-
The Validator component can validate public, protected or private properties.
14-
The following example shows how to validate that the ``$firstName`` property of
15-
the ``Author`` class has at least 3 characters::
16-
17-
// ...
18-
use Symfony\Component\Validator\Mapping\ClassMetadata;
19-
use Symfony\Component\Validator\Constraints as Assert;
20-
21-
class Author
22-
{
23-
private $firstName;
24-
25-
public static function loadValidatorMetadata(ClassMetadata $metadata)
26-
{
27-
$metadata->addPropertyConstraint('firstName', new Assert\NotBlank());
28-
$metadata->addPropertyConstraint(
29-
'firstName',
30-
new Assert\Length(array("min" => 3))
31-
);
32-
}
33-
}
34-
35-
Getters
36-
-------
37-
38-
Constraints can also be applied to the value returned by any public *getter*
39-
method, which are the methods whose names start with ``get``, ``has`` or ``is``.
40-
This feature allows to validate your objects dynamically.
41-
42-
Suppose that, for security reasons, you want to validate that a password field
43-
doesn't match the first name of the user. First, create a public method called
44-
``isPasswordSafe()`` to define this custom validation logic::
45-
46-
public function isPasswordSafe()
47-
{
48-
return $this->firstName !== $this->password;
49-
}
50-
51-
Then, add the Validator component configuration to the class::
52-
53-
// ...
54-
use Symfony\Component\Validator\Mapping\ClassMetadata;
55-
use Symfony\Component\Validator\Constraints as Assert;
56-
57-
class Author
58-
{
59-
public static function loadValidatorMetadata(ClassMetadata $metadata)
60-
{
61-
$metadata->addGetterConstraint('passwordSafe', new Assert\IsTrue(array(
62-
'message' => 'The password cannot match your first name',
63-
)));
64-
}
65-
}
66-
67-
Classes
68-
-------
69-
70-
Some constraints allow to validate the entire object. For example, the
71-
:doc:`Callback </reference/constraints/Callback>` constraint is a generic
72-
constraint that's applied to the class itself.
1+
.. index::
2+
single: Validator; Metadata
3+
4+
Metadata
5+
========
6+
7+
The :class:`Symfony\\Component\\Validator\\Mapping\\ClassMetadata` class
8+
represents and manages all the configured constraints on a given class.
9+
10+
Properties
11+
----------
12+
13+
The Validator component can validate public, protected or private properties.
14+
The following example shows how to validate that the ``$firstName`` property of
15+
the ``Author`` class has at least 3 characters::
16+
17+
// ...
18+
use Symfony\Component\Validator\Mapping\ClassMetadata;
19+
use Symfony\Component\Validator\Constraints as Assert;
20+
21+
class Author
22+
{
23+
private $firstName;
24+
25+
public static function loadValidatorMetadata(ClassMetadata $metadata)
26+
{
27+
$metadata->addPropertyConstraint('firstName', new Assert\NotBlank());
28+
$metadata->addPropertyConstraint(
29+
'firstName',
30+
new Assert\Length(array("min" => 3))
31+
);
32+
}
33+
}
34+
35+
Getters
36+
-------
37+
38+
Constraints can also be applied to the value returned by any public *getter*
39+
method, which are the methods whose names start with ``get``, ``has`` or ``is``.
40+
This feature allows to validate your objects dynamically.
41+
42+
Suppose that, for security reasons, you want to validate that a password field
43+
doesn't match the first name of the user. First, create a public method called
44+
``isPasswordSafe()`` to define this custom validation logic::
45+
46+
public function isPasswordSafe()
47+
{
48+
return $this->firstName !== $this->password;
49+
}
50+
51+
Then, add the Validator component configuration to the class::
52+
53+
// ...
54+
use Symfony\Component\Validator\Mapping\ClassMetadata;
55+
use Symfony\Component\Validator\Constraints as Assert;
56+
57+
class Author
58+
{
59+
public static function loadValidatorMetadata(ClassMetadata $metadata)
60+
{
61+
$metadata->addGetterConstraint('passwordSafe', new Assert\IsTrue(array(
62+
'message' => 'The password cannot match your first name',
63+
)));
64+
}
65+
}
66+
67+
Classes
68+
-------
69+
70+
Some constraints allow to validate the entire object. For example, the
71+
:doc:`Callback </reference/constraints/Callback>` constraint is a generic
72+
constraint that's applied to the class itself.

components/validator/resources.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,13 @@ Using a Custom MetadataFactory
179179
------------------------------
180180

181181
All the loaders and the cache are passed to an instance of
182-
:class:`Symfony\\Component\\Validator\\Mapping\\Factory\\LazyLoadingMetadataFactory`.
182+
:class:`Symfony\\Component\\Validator\\Mapping\\Factory\\LazyLoadingMetadataFactory`.
183183
This class is responsible for creating a ``ClassMetadata`` instance from all the
184184
configured resources.
185185

186186
You can also use a custom metadata factory implementation by creating a class
187187
which implements
188-
:class:`Symfony\\Component\\Validator\\Mapping\\Factory\\MetadataFactoryInterface`.
188+
:class:`Symfony\\Component\\Validator\\Mapping\\Factory\\MetadataFactoryInterface`.
189189
You can set this custom implementation using
190190
:method:`Symfony\\Component\\Validator\\ValidatorBuilder::setMetadataFactory`::
191191

console/command_in_controller.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Run this command from inside your controller via::
5555

5656
// return the output, don't use if you used NullOutput()
5757
$content = $output->fetch();
58-
58+
5959
// return new Response(""), if you used NullOutput()
6060
return new Response($content);
6161
}

contributing/code/bugs.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ If your problem definitely looks like a bug, report it using the official bug
2626
* Describe the steps needed to reproduce the bug with short code examples
2727
(providing a unit test that illustrates the bug is best);
2828

29-
* If the bug you experienced is not obvious or affects more than one layer,
30-
providing a simple failing unit test may not be sufficient. In this case,
29+
* If the bug you experienced is not obvious or affects more than one layer,
30+
providing a simple failing unit test may not be sufficient. In this case,
3131
please :doc:`provide a reproducer </contributing/code/reproducer>`;
3232

3333
* Give as much detail as possible about your environment (OS, PHP version,

create_framework/front_controller.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ web root directory:
140140
141141
example.com
142142
├── composer.json
143-
├── composer.lock
143+
├── composer.lock
144144
├── src
145145
│ └── pages
146146
│ ├── hello.php

create_framework/http_kernel_httpkernel_class.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ attributes with route parameters.
6464
Our code is now much more concise and surprisingly more robust and more
6565
powerful than ever. For instance, use the built-in ``ExceptionListener`` to
6666
make your error management configurable::
67-
67+
6868
$errorHandler = function (Symfony\Component\Debug\Exception\FlattenException $exception) {
6969
$msg = 'Something went wrong! ('.$exception->getMessage().')';
7070

create_framework/separation_of_concerns.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ To sum up, here is the new file layout:
142142
143143
example.com
144144
├── composer.json
145-
├── composer.lock
145+
├── composer.lock
146146
├── src
147147
│ ├── app.php
148148
│ └── Simplex

deployment/platformsh.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Platform.sh how to deploy your application (read more about
3636
3737
# The name of this app. Must be unique within a project.
3838
name: myphpproject
39-
39+
4040
# The type of the application to build.
4141
type: php:5.6
4242
build:

form/action_method.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ options:
8888
// ...
8989
}
9090
}
91-
91+
9292
9393
.. code-block:: php-standalone
9494

form/form_collections.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ add the ``allow_add`` option to your collection field::
293293
public function buildForm(FormBuilderInterface $builder, array $options)
294294
{
295295
$builder->add('description');
296-
296+
297297
$builder->add('tags', 'collection', array(
298298
'type' => new TagType(),
299299
'options' => array('label' => false),
@@ -408,7 +408,7 @@ one example:
408408
// Replace '__name__label__' in the prototype's HTML to
409409
// instead be a number based on how many items we have
410410
// newForm = newForm.replace(/__name__label__/g, index);
411-
411+
412412
// Replace '__name__' in the prototype's HTML to
413413
// instead be a number based on how many items we have
414414
newForm = newForm.replace(/__name__/g, index);

form/without_class.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ but here's a short example:
101101
If you are using validation groups, you need to either reference the
102102
``Default`` group when creating the form, or set the correct group on
103103
the constraint you are adding.
104-
104+
105105
.. code-block:: php
106106
107107
new NotBlank(array('groups' => array('create', 'update')));

http_cache.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ information about cache hits and misses.
149149
website or when you deploy your website to a shared host where you cannot
150150
install anything beyond PHP code. But being written in PHP, it cannot
151151
be as fast as a proxy written in C.
152-
152+
153153
Fortunately, since all reverse proxies are effectively the same, you should
154154
be able to switch to something more robust - like Varnish - without any problems.
155155
See :doc:`How to use Varnish </http_cache/varnish>`
@@ -191,7 +191,7 @@ These four headers are used to help cache your responses via *two* different mod
191191

192192
All of the HTTP headers you'll read about are *not* invented by Symfony! They're
193193
part of an HTTP specification that's used by sites all over the web. To dig deeper
194-
into HTTP Caching, check out the documents `RFC 7234 - Caching`_ and
194+
into HTTP Caching, check out the documents `RFC 7234 - Caching`_ and
195195
`RFC 7232 - Conditional Requests`_.
196196

197197
As a web developer, you are strongly urged to read the specification. Its

logging.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ your controller::
1515
$logger = $this->get('logger');
1616
$logger->info('I just got the logger');
1717
$logger->error('An error occurred');
18-
18+
1919
$logger->critical('I left the oven on!', array(
2020
// include extra "context" info in your logs
2121
'cause' => 'in_hurry',

0 commit comments

Comments
 (0)