From b3bc5aca3e6fa3f7c5d0c2b52f334cc2d28a0be5 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Tue, 18 Apr 2023 17:03:05 +0200 Subject: [PATCH] Don't use double backquotes in the comments --- .../cache/adapters/array_cache_adapter.rst | 2 +- event_dispatcher.rst | 2 +- service_container/autowiring.rst | 20 +++++++++---------- testing.rst | 5 ++--- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/components/cache/adapters/array_cache_adapter.rst b/components/cache/adapters/array_cache_adapter.rst index 7429593f993..1d8cd87269a 100644 --- a/components/cache/adapters/array_cache_adapter.rst +++ b/components/cache/adapters/array_cache_adapter.rst @@ -15,7 +15,7 @@ method:: // until the current PHP process finishes) $defaultLifetime = 0, - // if ``true``, the values saved in the cache are serialized before storing them + // if true, the values saved in the cache are serialized before storing them $storeSerialized = true, // the maximum lifetime (in seconds) of the entire cache (after this time, the diff --git a/event_dispatcher.rst b/event_dispatcher.rst index ae13f5d61a6..c04e309eb46 100644 --- a/event_dispatcher.rst +++ b/event_dispatcher.rst @@ -796,7 +796,7 @@ could listen to the ``mailer.post_send`` event and change the method's return va public function onMailerPostSend(AfterSendMailEvent $event) { $returnValue = $event->getReturnValue(); - // modify the original ``$returnValue`` value + // modify the original $returnValue value $event->setReturnValue($returnValue); } diff --git a/service_container/autowiring.rst b/service_container/autowiring.rst index 39fa1ba5299..60baa01b261 100644 --- a/service_container/autowiring.rst +++ b/service_container/autowiring.rst @@ -216,8 +216,8 @@ adding a service alias: # ... # but this fixes it! - # the ``app.rot13.transformer`` service will be injected when - # an ``App\Util\Rot13Transformer`` type-hint is detected + # the "app.rot13.transformer" service will be injected when + # an App\Util\Rot13Transformer type-hint is detected App\Util\Rot13Transformer: '@app.rot13.transformer' .. code-block:: xml @@ -251,8 +251,8 @@ adding a service alias: ->autowire(); // but this fixes it! - // the ``app.rot13.transformer`` service will be injected when - // an ``App\Util\Rot13Transformer`` type-hint is detected + // the "app.rot13.transformer" service will be injected when + // an App\Util\Rot13Transformer type-hint is detected $services->alias(Rot13Transformer::class, 'app.rot13.transformer'); }; @@ -355,8 +355,8 @@ To fix that, add an :ref:`alias `: $services->set(Rot13Transformer::class); - // the ``App\Util\Rot13Transformer`` service will be injected when - // an ``App\Util\TransformerInterface`` type-hint is detected + // the App\Util\Rot13Transformer service will be injected when + // an App\Util\TransformerInterface type-hint is detected $services->alias(TransformerInterface::class, Rot13Transformer::class); }; @@ -526,13 +526,13 @@ the injection:: $services->set(Rot13Transformer::class)->autowire(); $services->set(UppercaseTransformer::class)->autowire(); - // the ``App\Util\UppercaseTransformer`` service will be - // injected when an ``App\Util\TransformerInterface`` - // type-hint for a ``$shoutyTransformer`` argument is detected. + // the App\Util\UppercaseTransformer service will be + // injected when an App\Util\TransformerInterface + // type-hint for a $shoutyTransformer argument is detected. $services->alias(TransformerInterface::class.' $shoutyTransformer', UppercaseTransformer::class); // If the argument used for injection does not match, but the - // type-hint still matches, the ``App\Util\Rot13Transformer`` + // type-hint still matches, the App\Util\Rot13Transformer // service will be injected. $services->alias(TransformerInterface::class, Rot13Transformer::class); diff --git a/testing.rst b/testing.rst index c7885328242..3ca9f5e6e8a 100644 --- a/testing.rst +++ b/testing.rst @@ -566,11 +566,10 @@ In the above example, the test validates that the HTTP response was successful and the request body contains a ``

`` tag with ``"Hello world"``. The ``request()`` method also returns a crawler, which you can use to -create more complex assertions in your tests:: +create more complex assertions in your tests (e.g. to count the number of page +elements that match a given CSS selector):: $crawler = $client->request('GET', '/post/hello-world'); - - // for instance, count the number of ``.comment`` elements on the page $this->assertCount(4, $crawler->filter('.comment')); You can learn more about the crawler in :doc:`/testing/dom_crawler`.