From fd52cd3fe8f5c18afd9a0235541bd62b85dcaad1 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Mon, 22 Dec 2014 15:31:24 +0100 Subject: [PATCH] use boolean instead of Boolean --- book/forms.rst | 2 +- components/config/definition.rst | 2 ++ cookbook/configuration/using_parameters_in_dic.rst | 2 +- cookbook/doctrine/registration_form.rst | 2 +- cookbook/security/voters_data_permission.rst | 2 +- reference/configuration/framework.rst | 10 +++++----- reference/configuration/security.rst | 8 ++++---- reference/configuration/swiftmailer.rst | 4 ++-- reference/constraints/Choice.rst | 4 ++-- reference/constraints/Collection.rst | 8 ++++---- reference/constraints/Email.rst | 4 ++-- reference/constraints/False.rst | 2 +- reference/constraints/Isbn.rst | 4 ++-- reference/constraints/Issn.rst | 4 ++-- reference/constraints/Regex.rst | 4 ++-- reference/constraints/True.rst | 2 +- reference/constraints/UniqueEntity.rst | 2 +- reference/forms/types/checkbox.rst | 2 +- reference/forms/types/choice.rst | 6 +++--- reference/forms/types/collection.rst | 12 ++++++------ reference/forms/types/options/by_reference.rst.inc | 2 +- .../forms/types/options/cascade_validation.rst.inc | 2 +- reference/forms/types/options/empty_value.rst.inc | 2 +- reference/forms/types/options/error_bubbling.rst.inc | 2 +- reference/forms/types/options/expanded.rst.inc | 2 +- reference/forms/types/options/multiple.rst.inc | 2 +- reference/forms/types/options/read_only.rst.inc | 2 +- reference/forms/types/options/required.rst.inc | 2 +- reference/forms/types/options/trim.rst.inc | 2 +- reference/forms/types/options/with_minutes.rst.inc | 2 +- reference/forms/types/options/with_seconds.rst.inc | 2 +- reference/forms/types/password.rst | 4 ++-- reference/forms/types/radio.rst | 2 +- reference/forms/types/submit.rst | 2 +- reference/forms/types/time.rst | 4 ++-- .../types/variables/check_or_radio_table.rst.inc | 10 +++++----- 36 files changed, 66 insertions(+), 64 deletions(-) diff --git a/book/forms.rst b/book/forms.rst index 0119aa4575a..5cf0e2ca6e1 100644 --- a/book/forms.rst +++ b/book/forms.rst @@ -198,7 +198,7 @@ it into a format that's suitable for being rendered in an HTML form. ``task`` property via the ``getTask()`` and ``setTask()`` methods on the ``Task`` class. Unless a property is public, it *must* have a "getter" and "setter" method so that the Form component can get and put data onto the - property. For a Boolean property, you can use an "isser" or "hasser" method + property. For a boolean property, you can use an "isser" or "hasser" method (e.g. ``isPublished()`` or ``hasReminder()``) instead of a getter (e.g. ``getPublished()`` or ``getReminder()``). diff --git a/components/config/definition.rst b/components/config/definition.rst index 396328ef687..b79ad3853a2 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -99,6 +99,8 @@ node definition. Node types are available for: * scalar (generic type that includes booleans, strings, integers, floats and ``null``) * boolean +* scalar +* boolean * integer (new in 2.2) * float (new in 2.2) * enum (new in 2.1) (similar to scalar, but it only allows a finite set of values) diff --git a/cookbook/configuration/using_parameters_in_dic.rst b/cookbook/configuration/using_parameters_in_dic.rst index c2eef5b0ab1..ecfe192a2ee 100644 --- a/cookbook/configuration/using_parameters_in_dic.rst +++ b/cookbook/configuration/using_parameters_in_dic.rst @@ -105,7 +105,7 @@ be injected with this parameter via the extension as follows:: public function __construct($debug) { - $this->debug = (Boolean) $debug; + $this->debug = (bool) $debug; } public function getConfigTreeBuilder() diff --git a/cookbook/doctrine/registration_form.rst b/cookbook/doctrine/registration_form.rst index 4e4abbb5a05..0c64e4cf7e3 100644 --- a/cookbook/doctrine/registration_form.rst +++ b/cookbook/doctrine/registration_form.rst @@ -194,7 +194,7 @@ Start by creating a simple class which represents the "registration":: public function setTermsAccepted($termsAccepted) { - $this->termsAccepted = (Boolean) $termsAccepted; + $this->termsAccepted = (bool) $termsAccepted; } } diff --git a/cookbook/security/voters_data_permission.rst b/cookbook/security/voters_data_permission.rst index 7ac729b9892..2376d393b53 100644 --- a/cookbook/security/voters_data_permission.rst +++ b/cookbook/security/voters_data_permission.rst @@ -121,7 +121,7 @@ edit a particular object. Here's an example implementation:: switch($attribute) { case self::VIEW: // the data object could have for example a method isPrivate() - // which checks the Boolean attribute $private + // which checks the boolean attribute $private if (!$post->isPrivate()) { return VoterInterface::ACCESS_GRANTED; } diff --git a/reference/configuration/framework.rst b/reference/configuration/framework.rst index 81b85e53063..675d770ac8c 100644 --- a/reference/configuration/framework.rst +++ b/reference/configuration/framework.rst @@ -87,7 +87,7 @@ http_method_override .. versionadded:: 2.3 The ``http_method_override`` option was introduced in Symfony 2.3. -**type**: ``Boolean`` **default**: ``true`` +**type**: ``boolean`` **default**: ``true`` This determines whether the ``_method`` request parameter is used as the intended HTTP method on POST requests. If enabled, the @@ -176,7 +176,7 @@ is set, then the ``ide`` option will be ignored. test ~~~~ -**type**: ``Boolean`` +**type**: ``boolean`` If this configuration parameter is present (and not ``false``), then the services related to testing your application (e.g. ``test.client``) are loaded. @@ -321,14 +321,14 @@ to the cookie specification. cookie_secure ............. -**type**: ``Boolean`` **default**: ``false`` +**type**: ``boolean`` **default**: ``false`` This determines whether cookies should only be sent over secure connections. cookie_httponly ............... -**type**: ``Boolean`` **default**: ``false`` +**type**: ``boolean`` **default**: ``false`` This determines whether cookies should only be accessible through the HTTP protocol. This means that the cookie won't be accessible by scripting languages, such @@ -641,7 +641,7 @@ to implement the :class:`Symfony\\Component\\Validator\\Mapping\\Cache\\CacheInt enable_annotations .................. -**type**: ``Boolean`` **default**: ``false`` +**type**: ``boolean`` **default**: ``false`` If this option is enabled, validation constraints can be defined using annotations. diff --git a/reference/configuration/security.rst b/reference/configuration/security.rst index b3d5807f475..c3f174f4a98 100644 --- a/reference/configuration/security.rst +++ b/reference/configuration/security.rst @@ -277,7 +277,7 @@ a separate firewall just for ``check_path`` URL). use_forward ........... -**type**: ``Boolean`` **default**: ``false`` +**type**: ``boolean`` **default**: ``false`` If you'd like the user to be forwarded to the login form instead of being redirected, set this option to ``true``. @@ -303,7 +303,7 @@ will look for a POST parameter with this name. post_only ......... -**type**: ``Boolean`` **default**: ``true`` +**type**: ``boolean`` **default**: ``true`` By default, you must submit your login form to the ``check_path`` URL as a POST request. By setting this option to ``false``, you can send a GET request @@ -312,10 +312,10 @@ to the ``check_path`` URL. Redirecting after Login ~~~~~~~~~~~~~~~~~~~~~~~ -* ``always_use_default_target_path`` (type: ``Boolean``, default: ``false``) +* ``always_use_default_target_path`` (type: ``boolean``, default: ``false``) * ``default_target_path`` (type: ``string``, default: ``/``) * ``target_path_parameter`` (type: ``string``, default: ``_target_path``) -* ``use_referer`` (type: ``Boolean``, default: ``false``) +* ``use_referer`` (type: ``boolean``, default: ``false``) .. _reference-security-pbkdf2: diff --git a/reference/configuration/swiftmailer.rst b/reference/configuration/swiftmailer.rst index d9614377bb3..ccadb7dcb69 100644 --- a/reference/configuration/swiftmailer.rst +++ b/reference/configuration/swiftmailer.rst @@ -169,7 +169,7 @@ For details, see :ref:`the cookbook entry. `. -If you want to have a Boolean field, use :doc:`checkbox `. +If you want to have a boolean field, use :doc:`checkbox `. +-------------+---------------------------------------------------------------------+ | Rendered as | ``input`` ``radio`` field | diff --git a/reference/forms/types/submit.rst b/reference/forms/types/submit.rst index 63385eb328c..89c3632999b 100644 --- a/reference/forms/types/submit.rst +++ b/reference/forms/types/submit.rst @@ -79,5 +79,5 @@ Form Variables ======== =========== ============================================================== Variable Type Usage ======== =========== ============================================================== -clicked ``Boolean`` Whether the button is clicked or not. +clicked ``boolean`` Whether the button is clicked or not. ======== =========== ============================================================== diff --git a/reference/forms/types/time.rst b/reference/forms/types/time.rst index 71b3af1cdb5..f729f419dcc 100644 --- a/reference/forms/types/time.rst +++ b/reference/forms/types/time.rst @@ -175,9 +175,9 @@ Form Variables +==============+=============+======================================================================+ | widget | ``mixed`` | The value of the `widget`_ option. | +--------------+-------------+----------------------------------------------------------------------+ -| with_minutes | ``Boolean`` | The value of the `with_minutes`_ option. | +| with_minutes | ``boolean`` | The value of the `with_minutes`_ option. | +--------------+-------------+----------------------------------------------------------------------+ -| with_seconds | ``Boolean`` | The value of the `with_seconds`_ option. | +| with_seconds | ``boolean`` | The value of the `with_seconds`_ option. | +--------------+-------------+----------------------------------------------------------------------+ | type | ``string`` | Only present when widget is ``single_text`` and HTML5 is activated, | | | | contains the input type to use (``datetime``, ``date`` or ``time``). | diff --git a/reference/forms/types/variables/check_or_radio_table.rst.inc b/reference/forms/types/variables/check_or_radio_table.rst.inc index ae137a3f200..ddc30c7fee6 100644 --- a/reference/forms/types/variables/check_or_radio_table.rst.inc +++ b/reference/forms/types/variables/check_or_radio_table.rst.inc @@ -1,5 +1,5 @@ -======== ============ ============================================ -Variable Type Usage -======== ============ ============================================ -checked ``Boolean`` Whether or not the current input is checked. -======== ============ ============================================ +======== =========== ============================================ +Variable Type Usage +======== =========== ============================================ +checked ``boolean`` Whether or not the current input is checked. +======== =========== ============================================