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

0 commit comments

Comments
 (0)