From defe52ec9eb552eb23a56a2b4a513337c5dbd8d3 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Thu, 28 Mar 2019 11:33:34 +0100 Subject: [PATCH] use :: instead of .. code-block:: php --- components/property_info.rst | 32 ++++++++++++--------------- components/security/authorization.rst | 4 +--- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/components/property_info.rst b/components/property_info.rst index 5bd198a0bbc..d514675750e 100644 --- a/components/property_info.rst +++ b/components/property_info.rst @@ -88,9 +88,7 @@ both provide list and type information it is probably better that: just mapped properties) are returned. * The :class:`Symfony\\Bridge\\Doctrine\\PropertyInfo\\DoctrineExtractor` has priority for type information so that entity metadata is used instead - of type-hinting to provide more accurate type information. - -.. code-block:: php + of type-hinting to provide more accurate type information:: use Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor; use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; @@ -373,21 +371,7 @@ ReflectionExtractor Using PHP reflection, the :class:`Symfony\\Component\\PropertyInfo\\Extractor\\ReflectionExtractor` provides list, type and access information from setter and accessor methods. -It can also provide return and scalar types for PHP 7+. - -.. note:: - - When using the Symfony framework, this service is automatically registered - when the ``property_info`` feature is enabled: - - .. code-block:: yaml - - # app/config/config.yml - framework: - property_info: - enabled: true - -.. code-block:: php +It can also provide return and scalar types for PHP 7+:: use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; @@ -401,6 +385,18 @@ It can also provide return and scalar types for PHP 7+. $reflectionExtractor->isReadable($class, $property); $reflectionExtractor->isWritable($class, $property); +.. note:: + + When using the Symfony framework, this service is automatically registered + when the ``property_info`` feature is enabled: + + .. code-block:: yaml + + # app/config/config.yml + framework: + property_info: + enabled: true + PhpDocExtractor ~~~~~~~~~~~~~~~ diff --git a/components/security/authorization.rst b/components/security/authorization.rst index b3893bf84a7..2f335346d01 100644 --- a/components/security/authorization.rst +++ b/components/security/authorization.rst @@ -101,9 +101,7 @@ The :class:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\Authentica voter supports the attributes ``IS_AUTHENTICATED_FULLY``, ``IS_AUTHENTICATED_REMEMBERED``, and ``IS_AUTHENTICATED_ANONYMOUSLY`` and grants access based on the current level of authentication, i.e. is the user fully authenticated, or only based -on a "remember-me" cookie, or even authenticated anonymously? - -.. code-block:: php +on a "remember-me" cookie, or even authenticated anonymously?:: use Symfony\Component\Security\Core\Authentication\AuthenticationTrustResolver; use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;