8000 use .. instead of .. code-block: php · symfony/symfony-docs@75fa25e · GitHub
[go: up one dir, main page]

Skip to content

Commit 75fa25e

Browse files
committed
use .. instead of .. code-block: php
1 parent 36b3ff4 commit 75fa25e

File tree

10 files changed

+20
-58
lines changed

10 files changed

+20
-58
lines changed

best_practices/security.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,7 @@ For controlling access on a controller-by-controller basis, use the ``@Security`
111111
annotation whenever possible. Placing it above each action makes it consistent and readable.
112112

113113
In our application, you need the ``ROLE_ADMIN`` in order to create a new post.
114-
Using ``@Security``, this looks like:
115-
116-
.. code-block:: php
114+
Using ``@Security``, this looks like::
117115

118116
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
119117
use Symfony\Component\Routing\Annotation\Route;

bundles/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ In your extension, you can load this and dynamically set its arguments::
309309
Using the Config component is fully optional. The ``load()`` method gets an
310310
array of configuration values. You can simply parse these arrays yourself
311311
(e.g. by overriding configurations and using :phpfunction:`isset` to check
312-
for the existence of a value). Be aware that it'll be very hard to support XML.
312+
for the existence of a value). Be aware that it'll be very hard to support XML::
313313

314314
.. code-block:: php
315315

components/property_access.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,7 @@ can use setters, the magic ``__set()`` method or properties to set values::
296296
var_dump($person->getChildren()); // [Person()];
297297

298298
You can also use ``__call()`` to set values but you need to enable the feature,
299-
see `Enable other Features`_.
300-
301-
.. code-block:: php
299+
see `Enable other Features`_::
302300

303301
// ...
304302
class Person
@@ -335,9 +333,7 @@ Writing to Array Properties
335333
~~~~~~~~~~~~~~~~~~~~~~~~~~~
336334

337335
The ``PropertyAccessor`` class allows to update the content of arrays stored in
338-
properties through *adder* and *remover* methods.
339-
340-
.. code-block:: php
336+
properties through *adder* and *remover* methods::
341337

342338
// ...
343339
class Person

components/property_info.rst

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ Usage
3737

3838
To use this component, create a new
3939
:class:`Symfony\\Component\\PropertyInfo\\PropertyInfoExtractor` instance and
40-
provide it with a set of information extractors.
41-
42-
.. code-block:: php
40+
provide it with a set of information extractors::
4341

4442
use Symfony\Component\PropertyInfo\PropertyInfoExtractor;
4543
use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor;
@@ -146,9 +144,7 @@ List Information
146144

147145
Extractors that implement :class:`Symfony\\Component\\PropertyInfo\\PropertyListExtractorInterface`
148146
provide the list of properties that are available on a class as an array
149-
containing 57AE each property name as a string.
150-
151-
.. code-block:: php
147+
containing each property name as a string::
152148

153149
$properties = $propertyInfo->getProperties($class);
154150
/*
@@ -168,9 +164,7 @@ Type Information
168164

169165
Extractors that implement :class:`Symfony\\Component\\PropertyInfo\\PropertyTypeExtractorInterface`
170166
provide :ref:`extensive data type information <components-property-info-type>`
171-
for a property.
172-
173-
.. code-block:: php
167+
for a property::
174168

175169
$types = $propertyInfo->getTypes($class, $property);
176170

@@ -199,9 +193,7 @@ Description Information
199193

200194
Extractors that implement :class:`Symfony\\Component\\PropertyInfo\\PropertyDescriptionExtractorInterface`
201195
provide long and short descriptions from a properties annotations as
202-
strings.
203-
204-
.. code-block:: php
196+
strings::
205197

206198
$title = $propertyInfo->getShortDescription($class, $property);
207199
/*
@@ -225,9 +217,7 @@ Access Information
225217
~~~~~~~~~~~~~~~~~~
226218

227219
Extractors that implement :class:`Symfony\\Component\\PropertyInfo\\PropertyAccessExtractorInterface`
228-
provide whether properties are readable or writable as booleans.
229-
230-
.. code-block:: php
220+
provide whether properties are readable or writable as booleans::
231221

232222
$propertyInfo->isReadable($class, $property);
233223
// Example Result: bool(true)
@@ -422,9 +412,7 @@ Using `phpDocumentor Reflection`_ to parse property and method annotations,
422412
the :class:`Symfony\\Component\\PropertyInfo\\Extractor\\PhpDocExtractor`
423413
provides type and description information. This extractor is automatically
424414
registered with the ``property_info`` in the Symfony Framework *if* the dependent
425-
library is present.
426-
427-
.. code-block:: php
415+
library is present::
428416

429417
use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor;
430418

@@ -447,9 +435,7 @@ Using :ref:`groups metadata <serializer-using-serialization-groups-annotations>`
447435
from the :doc:`Serializer component </components/serializer>`,
448436
the :class:`Symfony\\Component\\PropertyInfo\\Extractor\\SerializerExtractor`
449437
provides list information. This extractor is *not* registered automatically
450-
with the ``property_info`` service in the Symfony Framework.
451-
452-
.. code-block:: php
438+
with the ``property_info`` service in the Symfony Framework::
453439

454440
use Doctrine\Common\Annotations\AnnotationReader;
455441
use Symfony\Component\PropertyInfo\Extractor\SerializerExtractor;
@@ -475,9 +461,7 @@ DoctrineExtractor
475461
Using entity mapping data from `Doctrine ORM`_, the
476462
:class:`Symfony\\Bridge\\Doctrine\\PropertyInfo\\DoctrineExtractor`
477463
provides list and type information. This extractor is not registered automatically
478-
with the ``property_info`` service in the Symfony Framework.
479-
480-
.. code-block:: php
464+
with the ``property_info`` service in the Symfony Framework::
481465

482466
use Doctrine\ORM\EntityManager;
483467
use Doctrine\ORM\Tools\Setup;

components/serializer.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -883,9 +883,7 @@ If you want to deserialize such a structure, you need to add the
883883
:class:`Symfony\\Component\\Serializer\\Normalizer\\ArrayDenormalizer`
884884
to the set of normalizers. By appending ``[]`` to the type parameter of the
885885
:method:`Symfony\\Component\\Serializer\\Serializer::deserialize` method,
886-
you indicate that you're expecting an array instead of a single object.
887-
888-
.. code-block:: php
886+
you indicate that you're expecting an array instead of a single object::
889887

890888
use Symfony\Component\Serializer\Encoder\JsonEncoder;
891889
use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer;

components/var_dumper/advanced.rst

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,7 @@ output produced by the different casters.
235235
in Symfony 3.1.
236236

237237
If ``DUMP_STRING_LENGTH`` is set, then the length of a string is displayed
238-
next to its content:
239-
240-
.. code-block:: php
238+
next to its content::
241239

242240
use Symfony\Component\VarDumper\Dumper\AbstractDumper;
243241
use Symfony\Component\VarDumper\Dumper\CliDumper;
@@ -259,9 +257,7 @@ next to its content:
259257
// ]
260258

261259
If ``DUMP_LIGHT_ARRAY`` is set, then arrays are dumped in a shortened format
262-
similar to PHP's short array notation:
263-
264-
.. code-block:: php
260+
similar to PHP's short array notation::
265261

266262
use Symfony\Component\VarDumper\Dumper\AbstractDumper;
267263
use Symfony\Component\VarDumper\Dumper\CliDumper;
@@ -283,9 +279,7 @@ similar to PHP's short array notation:
283279
// ]
284280

285281
If you would like to use both options, then you can just combine them by
286-
using a the logical OR operator ``|``:
287-
288-
.. code-block:: php
282+
using a the logical OR operator ``|``::
289283

290284
use Symfony\Component\VarDumper\Dumper\AbstractDumper;
291285
use Symfony\Component\VarDumper\Dumper\CliDumper;

contributing/code/standards.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ Symfony Coding Standards in Detail
2727
----------------------------------
2828

2929
If you want to learn about the Symfony coding standards in detail, here's a
30-
short example containing most features described below:
31-
32-
.. code-block:: php
30+
short example containing most features described below::
3331

3432
/*
3533
* This file is part of the Symfony package.

deployment/proxies.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ Solution: setTrustedProxies()
2222
-----------------------------
2323

2424
To fix this, you need to tell Symfony which reverse proxy IP addresses to trust
25-
and what headers your reverse proxy uses to send information:
26-
27-
.. code-block:: php
25+
and what headers your reverse proxy uses to send information::
2826

2927
// web/app.php
3028

form/data_mappers.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ one of the values is changed.
7878

7979
The red, green and blue form fields have to be mapped to the constructor
8080
arguments and the ``Color`` instance has to be mapped to red, green and blue
81-
form fields. Recognize a familiar pattern? It's time for a data mapper!
82-
83-
.. code-block:: php
81+
form fields. Recognize a familiar pattern? It's time for a data mapper::
8482

8583
// src/App/Form/DataMapper/ColorMapper.php
8684
namespace App\Form\DataMapper;

form/without_class.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ but here's a short example::
103103

104104
If you are using validation groups, you need to either reference the
105105
``Default`` group when creating the form, or set the correct group on
106-
the constraint you are adding.
107-
108-
.. code-block:: php
106+
the constraint you are adding::
109107

110108
new NotBlank(['groups' => ['create', 'update']]);
111109

0 commit comments

Comments
 (0)
0