Skip to content

Commit

Permalink
use boolean instead of Boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Flothmann authored and xabbuh committed May 1, 2015
1 parent f8db4b0 commit fd52cd3
Show file tree
Hide file tree
Showing 36 changed files with 66 additions and 64 deletions.
2 changes: 1 addition & 1 deletion book/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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()``).

Expand Down
2 changes: 2 additions & 0 deletions components/config/definition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cookbook/configuration/using_parameters_in_dic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion cookbook/doctrine/registration_form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
2 changes: 1 addition & 1 deletion cookbook/security/voters_data_permission.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
10 changes: 5 additions & 5 deletions reference/configuration/framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down
8 changes: 4 additions & 4 deletions reference/configuration/security.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``.
Expand All @@ -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
Expand All @@ -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:

Expand Down
4 changes: 2 additions & 2 deletions reference/configuration/swiftmailer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,15 @@ For details, see :ref:`the cookbook entry. <sending-to-a-specified-address-but-w
disable_delivery
~~~~~~~~~~~~~~~~

**type**: ``Boolean`` **default**: ``false``
**type**: ``boolean`` **default**: ``false``

If true, the ``transport`` will automatically be set to ``null``, and no
emails will actually be delivered.

logging
~~~~~~~

**type**: ``Boolean`` **default**: ``%kernel.debug%``
**type**: ``boolean`` **default**: ``%kernel.debug%``

If true, Symfony's data collector will be activated for Swift Mailer and the
information will be available in the profiler.
Expand Down
4 changes: 2 additions & 2 deletions reference/constraints/Choice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ for details on its usage.
multiple
~~~~~~~~

**type**: ``Boolean`` **default**: ``false``
**type**: ``boolean`` **default**: ``false``

If this option is true, the input value is expected to be an array instead
of a single, scalar value. The constraint will check that each value of
Expand Down Expand Up @@ -344,7 +344,7 @@ too many options per the `max`_ option.
strict
~~~~~~

**type**: ``Boolean`` **default**: ``false``
**type**: ``boolean`` **default**: ``false``

If true, the validator will also check the type of the input value. Specifically,
this value is passed to as the third argument to the PHP :phpfunction:`in_array` method
Expand Down
8 changes: 4 additions & 4 deletions reference/constraints/Collection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ be executed against that element of the collection.
allowExtraFields
~~~~~~~~~~~~~~~~

**type**: ``Boolean`` **default**: false
**type**: ``boolean`` **default**: false

If this option is set to ``false`` and the underlying collection contains
one or more elements that are not included in the `fields`_ option, a validation
Expand All @@ -307,14 +307,14 @@ error will be returned. If set to ``true``, extra fields are ok.
extraFieldsMessage
~~~~~~~~~~~~~~~~~~

**type**: ``Boolean`` **default**: ``The fields {{ fields }} were not expected.``
**type**: ``boolean`` **default**: ``The fields {{ fields }} were not expected.``

The message shown if `allowExtraFields`_ is false and an extra field is detected.

allowMissingFields
~~~~~~~~~~~~~~~~~~

**type**: ``Boolean`` **default**: false
**type**: ``boolean`` **default**: false

If this option is set to ``false`` and one or more fields from the `fields`_
option are not present in the underlying collection, a validation error will
Expand All @@ -324,7 +324,7 @@ option are not present in the underlying collection.
missingFieldsMessage
~~~~~~~~~~~~~~~~~~~~

**type**: ``Boolean`` **default**: ``The fields {{ fields }} are missing.``
**type**: ``boolean`` **default**: ``The fields {{ fields }} are missing.``

The message shown if `allowMissingFields`_ is false and one or more fields
are missing from the underlying collection.
4 changes: 2 additions & 2 deletions reference/constraints/Email.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ This message is shown if the underlying data is not a valid email address.
checkMX
~~~~~~~

**type**: ``Boolean`` **default**: ``false``
**type**: ``boolean`` **default**: ``false``

If true, then the :phpfunction:`checkdnsrr` PHP function will be used to
check the validity of the MX record of the host of the given email.

checkHost
~~~~~~~~~

**type**: ``Boolean`` **default**: ``false``
**type**: ``boolean`` **default**: ``false``

If true, then the :phpfunction:`checkdnsrr` PHP function will be used to
check the validity of the MX *or* the A *or* the AAAA record of the host
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/False.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ method returns **false**:
.. caution::

When using YAML, be sure to surround ``False`` with quotes (``'False'``)
or else YAML will convert this into a ``false`` Boolean value.
or else YAML will convert this into a ``false`` boolean value.

Options
-------
Expand Down
4 changes: 2 additions & 2 deletions reference/constraints/Isbn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ Available Options
isbn10
~~~~~~

**type**: ``boolean``
**type**: ``boolean`` **default**: ``false``

If this required option is set to ``true`` the constraint will check if the
code is a valid ISBN-10 code.

isbn13
~~~~~~

**type**: ``boolean``
**type**: ``boolean`` **default**: ``false``

If this required option is set to ``true`` the constraint will check if the
code is a valid ISBN-13 code.
Expand Down
4 changes: 2 additions & 2 deletions reference/constraints/Issn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ The message shown if the given value is not a valid ISSN.
caseSensitive
~~~~~~~~~~~~~

**type**: ``Boolean`` default: ``false``
**type**: ``boolean`` default: ``false``

The validator will allow ISSN values to end with a lower case 'x' by default.
When switching this to ``true``, the validator requires an upper case 'X'.

requireHyphen
~~~~~~~~~~~~~

**type**: ``Boolean`` default: ``false``
**type**: ``boolean`` default: ``false``

The validator will allow non hyphenated ISSN values by default. When switching
this to ``true``, the validator requires a hyphenated ISSN value.
Expand Down
4 changes: 2 additions & 2 deletions reference/constraints/Regex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ htmlPattern
.. versionadded:: 2.1
The ``htmlPattern`` option was introduced in Symfony 2.1

**type**: ``string|Boolean`` **default**: null
**type**: ``string|boolean`` **default**: null

This option specifies the pattern to use in the HTML5 ``pattern`` attribute.
You usually don't need to specify this option because by default, the constraint
Expand Down Expand Up @@ -264,7 +264,7 @@ Setting ``htmlPattern`` to false will disable client side validation.
match
~~~~~

**type**: ``Boolean`` default: ``true``
**type**: ``boolean`` default: ``true``

If ``true`` (or not set), this validator will pass if the given string matches
the given `pattern`_ regular expression. However, when this option is set
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/True.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ If the ``isTokenValid()`` returns false, the validation will fail.
.. caution::

When using YAML, be sure to surround ``True`` with quotes (``'True'``)
or else YAML will convert this into a ``true`` Boolean value.
or else YAML will convert this into a ``true`` boolean value.

Options
-------
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/UniqueEntity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ Now, the message would be bound to the ``port`` field with this configuration.
ignoreNull
~~~~~~~~~~

**type**: ``Boolean`` **default**: ``true``
**type**: ``boolean`` **default**: ``true``

.. versionadded:: 2.1
The ``ignoreNull`` option was introduced in Symfony 2.1.
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/checkbox.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ checkbox Field Type
===================

Creates a single input checkbox. This should always be used for a field that
has a Boolean value: if the box is checked, the field will be set to true,
has a boolean value: if the box is checked, the field will be set to true,
if the box is unchecked, the value will be set to false.

+-------------+------------------------------------------------------------------------+
Expand Down
6 changes: 3 additions & 3 deletions reference/forms/types/choice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ Field Variables
+------------------------+--------------+-------------------------------------------------------------------+
| Variable | Type | Usage |
+========================+==============+===================================================================+
| multiple | ``Boolean`` | The value of the `multiple`_ option. |
| multiple | ``boolean`` | The value of the `multiple`_ option. |
+------------------------+--------------+-------------------------------------------------------------------+
| expanded | ``Boolean`` | The value of the `expanded`_ option. |
| expanded | ``boolean`` | The value of the `expanded`_ option. |
+------------------------+--------------+-------------------------------------------------------------------+
| preferred_choices | ``array`` | A nested array containing the ``ChoiceView`` objects of |
| | | choices which should be presented to the user with priority. |
Expand All @@ -210,7 +210,7 @@ Field Variables
| is_selected | ``callable`` | A callable which takes a ``ChoiceView`` and the selected value(s) |
| | | and returns whether the choice is in the selected value(s). |
+------------------------+--------------+-------------------------------------------------------------------+
| empty_value_in_choices | ``Boolean`` | Whether the empty value is in the choice list. |
| empty_value_in_choices | ``boolean`` | Whether the empty value is in the choice list. |
+------------------------+--------------+-------------------------------------------------------------------+

.. tip::
Expand Down
12 changes: 6 additions & 6 deletions reference/forms/types/collection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Field Options
allow_add
~~~~~~~~~

**type**: ``Boolean`` **default**: ``false``
**type**: ``boolean`` **default**: ``false``

If set to ``true``, then if unrecognized items are submitted to the collection,
they will be added as new items. The ending array will contain the existing
Expand All @@ -235,7 +235,7 @@ client side. For more information, see the above example and :ref:`cookbook-form
allow_delete
~~~~~~~~~~~~

**type**: ``Boolean`` **default**: ``false``
**type**: ``boolean`` **default**: ``false``

If set to ``true``, then if an existing item is not contained in the submitted
data, it will be correctly absent from the final array of items. This means
Expand Down Expand Up @@ -280,7 +280,7 @@ you'd need to at least pass the ``choices`` option to the underlying type::
prototype
~~~~~~~~~

**type**: ``Boolean`` **default**: ``true``
**type**: ``boolean`` **default**: ``true``

This option is useful when using the `allow_add`_ option. If ``true`` (and
if `allow_add`_ is also ``true``), a special "prototype" attribute will be
Expand Down Expand Up @@ -359,7 +359,7 @@ The default value is ``array()`` (empty array).
error_bubbling
~~~~~~~~~~~~~~

**type**: ``Boolean`` **default**: ``true``
**type**: ``boolean`` **default**: ``true``

.. include:: /reference/forms/types/options/_error_bubbling_body.rst.inc

Expand All @@ -379,6 +379,6 @@ Field Variables
============ =========== ========================================
Variable Type Usage
============ =========== ========================================
allow_add ``Boolean`` The value of the `allow_add`_ option.
allow_delete ``Boolean`` The value of the `allow_delete`_ option.
allow_add ``boolean`` The value of the `allow_add`_ option.
allow_delete ``boolean`` The value of the `allow_delete`_ option.
============ =========== ========================================
2 changes: 1 addition & 1 deletion reference/forms/types/options/by_reference.rst.inc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
by_reference
~~~~~~~~~~~~

**type**: ``Boolean`` **default**: ``true``
**type**: ``boolean`` **default**: ``true``

In most cases, if you have a ``name`` field, then you expect ``setName()``
to be called on the underlying object. In some cases, however, ``setName()``
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/options/cascade_validation.rst.inc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cascade_validation
~~~~~~~~~~~~~~~~~~

**type**: Boolean **default**: false
**type**: ``boolean`` **default**: ``false``

Set this option to ``true`` to force validation on embedded form types.
For example, if you have a ``ProductType`` with an embedded ``CategoryType``,
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/options/empty_value.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ empty_value
Since Symfony 2.3, empty values are also supported if the ``expanded``
option is set to true.

**type**: ``string`` or ``Boolean``
**type**: ``string`` or ``boolean``

This option determines whether or not a special "empty" option (e.g. "Choose an option")
will appear at the top of a select widget. This option only applies if the
Expand Down
2 changes: 1 addition & 1 deletion reference/forms/types/options/error_bubbling.rst.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
error_bubbling
~~~~~~~~~~~~~~

**type**: ``Boolean`` **default**: ``false`` unless the form is ``compound``
**type**: ``boolean`` **default**: ``false`` unless the form is ``compound``

.. include:: /reference/forms/types/options/_error_bubbling_body.rst.inc
Loading

0 comments on commit fd52cd3

Please sign in to comment.