Skip to content

Commit 2811ac0

Browse files
committed
Merge pull request symfony#3173 from bicpi/fixing_typos_formatting_logic_collection
Collection of fixes: Typos, Formatting, Logic, Links
2 parents e51fd41 + 28c800c commit 2811ac0

File tree

26 files changed

+64
-64
lines changed

26 files changed

+64
-64
lines changed

book/http_fundamentals.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ So then, what *is* the Symfony2 *Framework*? The *Symfony2 Framework* is
551551
a PHP library that accomplishes two distinct tasks:
552552

553553
#. Provides a selection of components (i.e. the Symfony2 Components) and
554-
third-party libraries (e.g. `Swiftmailer`_ for sending emails);
554+
third-party libraries (e.g. `Swift Mailer`_ for sending emails);
555555

556556
#. Provides sensible configuration and a "glue" library that ties all of these
557557
pieces together.
@@ -577,4 +577,4 @@ sensible defaults. For more advanced users, the sky is the limit.
577577
.. _`Validator`: https://github.com/symfony/Validator
578578
.. _`Security`: https://github.com/symfony/Security
579579
.. _`Translation`: https://github.com/symfony/Translation
580-
.. _`Swiftmailer`: http://swiftmailer.org/
580+
.. _`Swift Mailer`: http://swiftmailer.org/

book/testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ The Client used by functional tests creates a Kernel that runs in a special
677677
in the ``test`` environment, you can tweak any of your application's settings
678678
specifically for testing.
679679

680-
For example, by default, the swiftmailer is configured to *not* actually
680+
For example, by default, the Swift Mailer is configured to *not* actually
681681
deliver emails in the ``test`` environment. You can see this under the ``swiftmailer``
682682
configuration option:
683683

components/dependency_injection/compilation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ It is compiled by running::
1313

1414
$container->compile();
1515

16-
The compile method uses *Compiler Passes* for the compilation. The *Dependency Injection*
16+
The compile method uses *Compiler Passes* for the compilation. The Dependency Injection
1717
component comes with several passes which are automatically registered for
1818
compilation. For example the :class:`Symfony\\Component\\DependencyInjection\\Compiler\\CheckDefinitionValidityPass`
1919
checks for various potential issues with the definitions that have been set
@@ -40,7 +40,7 @@ and can be registered with the container with::
4040

4141
$container->registerExtension($extension);
4242

43-
The main work of the extension is done in the ``load`` method. In the load method
43+
The main work of the extension is done in the ``load`` method. In the ``load`` method
4444
you can load configuration from one or more configuration files as well as
4545
manipulate the container definitions using the methods shown in :doc:`/components/dependency_injection/definitions`.
4646

components/dependency_injection/definitions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ You can add a new argument to the end of the arguments array using::
7373
$definition->addArgument($argument);
7474

7575
The argument can be a string, an array, a service parameter by using ``%parameter_name%``
76-
or a service id by using ::
76+
or a service id by using::
7777

7878
use Symfony\Component\DependencyInjection\Reference;
7979

@@ -122,6 +122,6 @@ You can also replace any existing method calls with an array of new ones with::
122122
.. note::
123123

124124
The methods here that change service definitions can only be used before
125-
the container is compiled, once the container is compiled you cannot
125+
the container is compiled. Once the container is compiled you cannot
126126
manipulate service definitions further. To learn more about compiling
127127
the container see :doc:`/components/dependency_injection/compilation`.

components/dependency_injection/factories.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For this situation, you can use a factory to create the object and tell the
1212
service container to call a method on the factory rather than directly instantiating
1313
the class.
1414

15-
Suppose you have a factory that configures and returns a new NewsletterManager
15+
Suppose you have a factory that configures and returns a new ``NewsletterManager``
1616
object::
1717

1818
class NewsletterFactory

components/dependency_injection/parameters.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ One use for this is to inject the values into your services. This allows
6060
you to configure different versions of services between applications or multiple
6161
services based on the same class but configured differently within a single
6262
application. You could inject the choice of mail transport into the ``Mailer``
63-
class directly but by making it a parameter. This makes it easier to change
63+
class directly. But declaring it as a parameter makes it easier to change
6464
rather than being tied up and hidden with the service definition:
6565

6666
.. configuration-block::
@@ -343,7 +343,7 @@ Start the string with ``@`` or ``@?`` to reference a service in Yaml.
343343
converted into the string ``"@mailer"`` instead of referencing the
344344
``mailer`` service.
345345

346-
Xml
346+
XML
347347
~~~
348348

349349
In XML, use the ``service`` type. The behavior if the service does not exist
@@ -352,7 +352,7 @@ is thrown. Valid values for ``on-invalid`` are ``null`` (uses ``null`` in place
352352
of the missing service) or ``ignored`` (very similar, except if used on a
353353
method call, the method call is removed).
354354

355-
Php
355+
PHP
356356
~~~
357357

358358
In PHP, you can use the

components/dependency_injection/tags.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ To begin with, define the ``TransportChain`` class::
2727
$this->transports = array();
2828
}
2929

30-
public function addTransport(\Swift_Transport $transport)
30+
public function addTransport(\Swift_Transport $transport)
3131
{
3232
$this->transports[] = $transport;
3333
}
@@ -176,7 +176,7 @@ Adding additional attributes on Tags
176176
------------------------------------
177177

178178
Sometimes you need additional information about each service that's tagged with your tag.
179-
For example, you might want to add an alias to each TransportChain.
179+
For example, you might want to add an alias to each member of the transport chain.
180180

181181
To begin with, change the ``TransportChain`` class::
182182

components/event_dispatcher/introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ Or::
564564

565565
Or::
566566

567-
$response = $dispatcher->dispatch('bar.event', new BarEvent())->getBar();
567+
$bar = $dispatcher->dispatch('bar.event', new BarEvent())->getBar();
568568

569569
and so on...
570570

components/form/introduction.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,12 +334,12 @@ and then access it whenever you need to build a form.
334334

335335
.. note::
336336

337-
In this document, the form factory is always a locally variable called
337+
In this document, the form factory is always a local variable called
338338
``$formFactory``. The point here is that you will probably need to create
339339
this object in some more "global" way so you can access it from anywhere.
340340

341341
Exactly how you gain access to your one form factory is up to you. If you're
342-
using a :term`Service Container`, then you should add the form factory to
342+
using a :term:`Service Container`, then you should add the form factory to
343343
your container and grab it out whenever you need to. If your application
344344
uses global or static variables (not usually a good idea), then you can store
345345
the object on some static class or do something similar.
@@ -414,7 +414,7 @@ it and :ref:`process the form submission <component-form-intro-handling-submissi
414414
Setting Default Values
415415
~~~~~~~~~~~~~~~~~~~~~~
416416

417-
If you need you form to load with some default values (or you're building
417+
If you need your form to load with some default values (or you're building
418418
an "edit" form), simply pass in the default data when creating your form
419419
builder:
420420

components/http_foundation/introduction.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ can be accessed via several public properties:
6161

6262
* ``cookies``: equivalent of ``$_COOKIE``;
6363

64-
* ``attributes``: no equivalent - used by your app to store other data (see :ref:`below <component-foundation-attributes>`)
64+
* ``attributes``: no equivalent - used by your app to store other data (see :ref:`below <component-foundation-attributes>`);
6565

6666
* ``files``: equivalent of ``$_FILES``;
6767

@@ -109,7 +109,7 @@ methods to retrieve and update its data:
109109
parameter by name;
110110

111111
* :method:`Symfony\\Component\\HttpFoundation\\ParameterBag::has`: Returns
112-
true if the parameter is defined;
112+
``true`` if the parameter is defined;
113113

114114
* :method:`Symfony\\Component\\HttpFoundation\\ParameterBag::remove`: Removes
115115
a parameter.
@@ -461,7 +461,7 @@ whether or not the ``X-Sendfile-Type`` header should be trusted and call
461461
:method:`Symfony\\Component\\HttpFoundation\\BinaryFileResponse::trustXSendfileTypeHeader`
462462
if it should::
463463

464-
$response::trustXSendfileTypeHeader();
464+
BinaryFileResponse::trustXSendfileTypeHeader();
465465

466466
You can still set the ``Content-Type`` of the sent file, or change its ``Content-Disposition``::
467467

components/http_foundation/session_configuration.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ be securely controlled from the server side.
119119

120120
The ``cookie_lifetime`` setting is the number of seconds the cookie should live
121121
for, it is not a Unix timestamp. The resulting session cookie will be stamped
122-
with an expiry time of ``time()``+``cookie_lifetime`` where the time is taken
122+
with an expiry time of ``time()`` + ``cookie_lifetime`` where the time is taken
123123
from the server.
124124

125125
Configuring Garbage Collection
@@ -132,7 +132,7 @@ of 5%. Similarly, ``3/4`` would mean a 3 in 4 chance of being called, i.e. 75%.
132132

133133
If the garbage collection handler is invoked, PHP will pass the value stored in
134134
the ``php.ini`` directive ``session.gc_maxlifetime``. The meaning in this context is
135-
that any stored session that was saved more than ``maxlifetime`` ago should be
135+
that any stored session that was saved more than ``gc_maxlifetime`` ago should be
136136
deleted. This allows one to expire records based on idle time.
137137

138138
You can configure these settings by passing ``gc_probability``, ``gc_divisor``
@@ -173,8 +173,8 @@ example, it is common for banking applications to log the user out after just
173173
5 to 10 minutes of inactivity. Setting the cookie lifetime here is not
174174
appropriate because that can be manipulated by the client, so we must do the expiry
175175
on the server side. The easiest way is to implement this via garbage collection
176-
which runs reasonably frequently. The cookie ``lifetime`` would be set to a
177-
relatively high value, and the garbage collection ``maxlifetime`` would be set
176+
which runs reasonably frequently. The ``cookie_lifetime`` would be set to a
177+
relatively high value, and the garbage collection ``gc_maxlifetime`` would be set
178178
to destroy sessions at whatever the desired idle period is.
179179

180180
The other option is to specifically checking if a session has expired after the
@@ -258,7 +258,7 @@ without knowledge of the specific save handler.
258258

259259
.. note::
260260

261-
Before PHP 5.4, you can only proxy user-land save handlers but not
261+
Before PHP 5.4, you can only proxy user-land save handlers but not
262262
native PHP save handlers.
263263

264264
.. _`php.net/session.customhandler`: http://php.net/session.customhandler

components/http_foundation/session_testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ starting one allowing you to test your code without complications. You may also
1818
run multiple instances in the same PHP process.
1919

2020
The mock storage drivers do not read or write the system globals
21-
`session_id()` or `session_name()`. Methods are provided to simulate this if
21+
``session_id()`` or ``session_name()``. Methods are provided to simulate this if
2222
required:
2323

2424
* :method:`Symfony\\Component\\HttpFoundation\\Session\\SessionStorageInterface::getId`: Gets the

components/http_foundation/sessions.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,24 +66,24 @@ as follows divided into a couple of groups.
6666
Session workflow
6767

6868
* :method:`Symfony\\Component\\HttpFoundation\\Session\\Session::start`:
69-
Starts the session - do not use ``session_start()``.
69+
Starts the session - do not use ``session_start()``;
7070

7171
* :method:`Symfony\\Component\\HttpFoundation\\Session\\Session::migrate`:
7272
Regenerates the session ID - do not use ``session_regenerate_id()``.
7373
This method can optionally change the lifetime of the new cookie that will
74-
be emitted by calling this method.
74+
be emitted by calling this method;
7575

7676
* :method:`Symfony\\Component\\HttpFoundation\\Session\\Session::invalidate`:
77-
Clears all session data and regenerates session ID. Do not use ``session_destroy()``.
77+
Clears all session data and regenerates session ID. Do not use ``session_destroy()``;
7878

7979
* :method:`Symfony\\Component\\HttpFoundation\\Session\\Session::getId`: Gets the
80-
session ID. Do not use ``session_id()``.
80+
session ID. Do not use ``session_id()``;
8181

8282
* :method:`Symfony\\Component\\HttpFoundation\\Session\\Session::setId`: Sets the
83-
session ID. Do not use ``session_id()``.
83+
session ID. Do not use ``session_id()``;
8484

8585
* :method:`Symfony\\Component\\HttpFoundation\\Session\\Session::getName`: Gets the
86-
session name. Do not use ``session_name()``.
86+
session name. Do not use ``session_name()``;
8787

8888
* :method:`Symfony\\Component\\HttpFoundation\\Session\\Session::setName`: Sets the
8989
session name. Do not use ``session_name()``.
@@ -103,23 +103,23 @@ Session attributes
103103
Returns true if the attribute exists;
104104

105105
* :method:`Symfony\\Component\\HttpFoundation\\Session\\Session::replace`:
106-
Sets multiple attributes at once: takes a keyed array and sets each key => value pair.
106+
Sets multiple attributes at once: takes a keyed array and sets each key => value pair;
107107

108108
* :method:`Symfony\\Component\\HttpFoundation\\Session\\Session::remove`:
109109
Deletes an attribute by key;
110110

111111
* :method:`Symfony\\Component\\HttpFoundation\\Session\\Session::clear`:
112-
Clear all attributes;
112+
Clear all attributes.
113113

114114
The attributes are stored internally in an "Bag", a PHP object that acts like
115115
an array. A few methods exist for "Bag" management:
116116

117117
* :method:`Symfony\\Component\\HttpFoundation\\Session\\Session::registerBag`:
118-
Registers a :class:`Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface`
118+
Registers a :class:`Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface`;
119119

120120
* :method:`Symfony\\Component\\HttpFoundation\\Session\\Session::getBag`:
121121
Gets a :class:`Symfony\\Component\\HttpFoundation\\Session\\SessionBagInterface` by
122-
bag name.
122+
bag name;
123123

124124
* :method:`Symfony\\Component\\HttpFoundation\\Session\\Session::getFlashBag`:
125125
Gets the :class:`Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface`.
@@ -242,7 +242,7 @@ would be displayed immediately on the subsequent page load for that session.
242242
This is however just one application for flash messages.
243243

244244
* :class:`Symfony\\Component\\HttpFoundation\\Session\\Flash\\AutoExpireFlashBag`
245-
This implementation messages set in one page-load will
245+
In this implementation, messages set in one page-load will
246246
be available for display only on the next page load. These messages will auto
247247
expire regardless of if they are retrieved or not.
248248

@@ -306,7 +306,7 @@ Examples of setting multiple flashes::
306306
$session->getFlashBag()->add('error', 'Failed to update name');
307307
$session->getFlashBag()->add('error', 'Another error');
308308

309-
Displaying the flash messages might look like this:
309+
Displaying the flash messages might look as follows.
310310

311311
Simple, display one type of message::
312312

components/http_kernel/introduction.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ listeners to the events discussed below::
104104
// by dispatching events, calling a controller, and returning the response
105105
$response = $kernel->handle($request);
106106

107-
// echo the content and send the headers
107+
// send the headers and echo the content
108108
$response->send();
109109

110110
// triggers the kernel.terminate event
@@ -464,7 +464,7 @@ because it occurs *after* the ``HttpKernel::handle`` method, and after the
464464
response is sent to the user. Recall from above, then the code that uses
465465
the kernel, ends like this::
466466

467-
// echo the content and send the headers
467+
// send the headers and echo the content
468468
$response->send();
469469

470470
// triggers the kernel.terminate event

contributing/code/tests.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ autoloaded from `vendor/` under the main root directory (see
2525
The test suite needs the following third-party libraries:
2626

2727
* Doctrine
28-
* Swiftmailer
28+
* Swift Mailer
2929
* Twig
3030
* Monolog
3131

cookbook/controller/error_pages.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ end-user, create a new template located at
6363
.. tip::
6464

6565
If you're not familiar with Twig, don't worry. Twig is a simple, powerful
66-
and optional templating engine that integrates with ``Symfony2``. For more
66+
and optional templating engine that integrates with Symfony2. For more
6767
information about Twig see :doc:`/book/templating`.
6868

6969
In addition to the standard HTML error page, Symfony provides a default error

cookbook/deployment-tools.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ B) Update your vendors
8484
Your vendors can be updated before transferring your source code (i.e.
8585
update the ``vendor/`` directory, then transfer that with your source
8686
code) or afterwards on the server. Either way, just update your vendors
87-
as your normally do:
87+
as you normally do:
8888

8989
.. code-block:: bash
9090

cookbook/email/dev_environment.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ Now, suppose you're sending an email to ``recipient@example.com``.
109109
}
110110
111111
In the ``dev`` environment, the email will instead be sent to ``dev@example.com``.
112-
Swiftmailer will add an extra header to the email, ``X-Swift-To``, containing
112+
Swift Mailer will add an extra header to the email, ``X-Swift-To``, containing
113113
the replaced address, so you can still see who it would have been sent to.
114114

115115
.. note::
116116

117117
In addition to the ``to`` addresses, this will also stop the email being
118-
sent to any ``CC`` and ``BCC`` addresses set for it. Swiftmailer will add
118+
sent to any ``CC`` and ``BCC`` addresses set for it. Swift Mailer will add
119119
additional headers to the email with the overridden addresses in them.
120120
These are ``X-Swift-Cc`` and ``X-Swift-Bcc`` for the ``CC`` and ``BCC``
121121
addresses respectively.

0 commit comments

Comments
 (0)