Skip to content

Commit fd52cd3

Browse files
Christian Flothmannxabbuh
Christian Flothmann
authored andcommitted
use boolean instead of Boolean
1 parent f8db4b0 commit fd52cd3

36 files changed

+66
-64
lines changed

Diff for: book/forms.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ it into a format that's suitable for being rendered in an HTML form.
198198
``task`` property via the ``getTask()`` and ``setTask()`` methods on the
199199
``Task`` class. Unless a property is public, it *must* have a "getter" and
200200
"setter" method so that the Form component can get and put data onto the
201-
property. For a Boolean property, you can use an "isser" or "hasser" method
201+
property. For a boolean property, you can use an "isser" or "hasser" method
202202
(e.g. ``isPublished()`` or ``hasReminder()``) instead of a getter (e.g.
203203
``getPublished()`` or ``getReminder()``).
204204

Diff for: components/config/definition.rst

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ node definition. Node types are available for:
9999

100100
* scalar (generic type that includes booleans, strings, integers, floats and ``null``)
101101
* boolean
102+
* scalar
103+
* boolean
102104
* integer (new in 2.2)
103105
* float (new in 2.2)
104106
* enum (new in 2.1) (similar to scalar, but it only allows a finite set of values)

Diff for: cookbook/configuration/using_parameters_in_dic.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ be injected with this parameter via the extension as follows::
105105

106106
public function __construct($debug)
107107
{
108-
$this->debug = (Boolean) $debug;
108+
$this->debug = (bool) $debug;
109109
}
110110

111111
public function getConfigTreeBuilder()

Diff for: cookbook/doctrine/registration_form.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ Start by creating a simple class which represents the "registration"::
194194

195195
public function setTermsAccepted($termsAccepted)
196196
{
197-
$this->termsAccepted = (Boolean) $termsAccepted;
197+
$this->termsAccepted = (bool) $termsAccepted;
198198
}
199199
}
200200

Diff for: cookbook/security/voters_data_permission.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ edit a particular object. Here's an example implementation::
121121
switch($attribute) {
122122
case self::VIEW:
123123
// the data object could have for example a method isPrivate()
124-
// which checks the Boolean attribute $private
124+
// which checks the boolean attribute $private
125125
if (!$post->isPrivate()) {
126126
return VoterInterface::ACCESS_GRANTED;
127127
}

Diff for: reference/configuration/framework.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ http_method_override
8787
.. versionadded:: 2.3
8888
The ``http_method_override`` option was introduced in Symfony 2.3.
8989

90-
**type**: ``Boolean`` **default**: ``true``
90+
**type**: ``boolean`` **default**: ``true``
9191

9292
This determines whether the ``_method`` request parameter is used as the intended
9393
HTTP method on POST requests. If enabled, the
@@ -176,7 +176,7 @@ is set, then the ``ide`` option will be ignored.
176176
test
177177
~~~~
178178

179-
**type**: ``Boolean``
179+
**type**: ``boolean``
180180

181181
If this configuration parameter is present (and not ``false``), then the
182182
services related to testing your application (e.g. ``test.client``) are loaded.
@@ -321,14 +321,14 @@ to the cookie specification.
321321
cookie_secure
322322
.............
323323

324-
**type**: ``Boolean`` **default**: ``false``
324+
**type**: ``boolean`` **default**: ``false``
325325

326326
This determines whether cookies should only be sent over secure connections.
327327

328328
cookie_httponly
329329
...............
330330

331-
**type**: ``Boolean`` **default**: ``false``
331+
**type**: ``boolean`` **default**: ``false``
332332

333333
This determines whether cookies should only be accessible through the HTTP protocol.
334334
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
641641
enable_annotations
642642
..................
643643

644-
**type**: ``Boolean`` **default**: ``false``
644+
**type**: ``boolean`` **default**: ``false``
645645

646646
If this option is enabled, validation constraints can be defined using annotations.
647647

Diff for: reference/configuration/security.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ a separate firewall just for ``check_path`` URL).
277277
use_forward
278278
...........
279279

280-
**type**: ``Boolean`` **default**: ``false``
280+
**type**: ``boolean`` **default**: ``false``
281281

282282
If you'd like the user to be forwarded to the login form instead of being
283283
redirected, set this option to ``true``.
@@ -303,7 +303,7 @@ will look for a POST parameter with this name.
303303
post_only
304304
.........
305305

306-
**type**: ``Boolean`` **default**: ``true``
306+
**type**: ``boolean`` **default**: ``true``
307307

308308
By default, you must submit your login form to the ``check_path`` URL as
309309
a POST request. By setting this option to ``false``, you can send a GET request
@@ -312,10 +312,10 @@ to the ``check_path`` URL.
312312
Redirecting after Login
313313
~~~~~~~~~~~~~~~~~~~~~~~
314314

315-
* ``always_use_default_target_path`` (type: ``Boolean``, default: ``false``)
315+
* ``always_use_default_target_path`` (type: ``boolean``, default: ``false``)
316316
* ``default_target_path`` (type: ``string``, default: ``/``)
317317
* ``target_path_parameter`` (type: ``string``, default: ``_target_path``)
318-
* ``use_referer`` (type: ``Boolean``, default: ``false``)
318+
* ``use_referer`` (type: ``boolean``, default: ``false``)
319319

320320
.. _reference-security-pbkdf2:
321321

Diff for: reference/configuration/swiftmailer.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -169,15 +169,15 @@ For details, see :ref:`the cookbook entry. <sending-to-a-specified-address-but-w
169169
disable_delivery
170170
~~~~~~~~~~~~~~~~
171171

172-
**type**: ``Boolean`` **default**: ``false``
172+
**type**: ``boolean`` **default**: ``false``
173173

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

177177
logging
178178
~~~~~~~
179179

180-
**type**: ``Boolean`` **default**: ``%kernel.debug%``
180+
**type**: ``boolean`` **default**: ``%kernel.debug%``
181181

182182
If true, Symfony's data collector will be activated for Swift Mailer and the
183183
information will be available in the profiler.

Diff for: reference/constraints/Choice.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ for details on its usage.
281281
multiple
282282
~~~~~~~~
283283

284-
**type**: ``Boolean`` **default**: ``false``
284+
**type**: ``boolean`` **default**: ``false``
285285

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

347-
**type**: ``Boolean`` **default**: ``false``
347+
**type**: ``boolean`` **default**: ``false``
348348

349349
If true, the validator will also check the type of the input value. Specifically,
350350
this value is passed to as the third argument to the PHP :phpfunction:`in_array` method

Diff for: reference/constraints/Collection.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ be executed against that element of the collection.
298298
allowExtraFields
299299
~~~~~~~~~~~~~~~~
300300

301-
**type**: ``Boolean`` **default**: false
301+
**type**: ``boolean`` **default**: false
302302

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

310-
**type**: ``Boolean`` **default**: ``The fields {{ fields }} were not expected.``
310+
**type**: ``boolean`` **default**: ``The fields {{ fields }} were not expected.``
311311

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

314314
allowMissingFields
315315
~~~~~~~~~~~~~~~~~~
316316

317-
**type**: ``Boolean`` **default**: false
317+
**type**: ``boolean`` **default**: false
318318

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

327-
**type**: ``Boolean`` **default**: ``The fields {{ fields }} are missing.``
327+
**type**: ``boolean`` **default**: ``The fields {{ fields }} are missing.``
328328

329329
The message shown if `allowMissingFields`_ is false and one or more fields
330330
are missing from the underlying collection.

Diff for: reference/constraints/Email.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,15 @@ This message is shown if the underlying data is not a valid email address.
9999
checkMX
100100
~~~~~~~
101101

102-
**type**: ``Boolean`` **default**: ``false``
102+
**type**: ``boolean`` **default**: ``false``
103103

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

107107
checkHost
108108
~~~~~~~~~
109109

110-
**type**: ``Boolean`` **default**: ``false``
110+
**type**: ``boolean`` **default**: ``false``
111111

112112
If true, then the :phpfunction:`checkdnsrr` PHP function will be used to
113113
check the validity of the MX *or* the A *or* the AAAA record of the host

Diff for: reference/constraints/False.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ method returns **false**:
104104
.. caution::
105105

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

109109
Options
110110
-------

Diff for: reference/constraints/Isbn.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@ Available Options
106106
isbn10
107107
~~~~~~
108108

109-
**type**: ``boolean``
109+
**type**: ``boolean`` **default**: ``false``
110110

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

114114
isbn13
115115
~~~~~~
116116

117-
**type**: ``boolean``
117+
**type**: ``boolean`` **default**: ``false``
118118

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

Diff for: reference/constraints/Issn.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,15 @@ The message shown if the given value is not a valid ISSN.
9090
caseSensitive
9191
~~~~~~~~~~~~~
9292

93-
**type**: ``Boolean`` default: ``false``
93+
**type**: ``boolean`` default: ``false``
9494

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

9898
requireHyphen
9999
~~~~~~~~~~~~~
100100

101-
**type**: ``Boolean`` default: ``false``
101+
**type**: ``boolean`` default: ``false``
102102

103103
The validator will allow non hyphenated ISSN values by default. When switching
104104
this to ``true``, the validator requires a hyphenated ISSN value.

Diff for: reference/constraints/Regex.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ htmlPattern
180180
.. versionadded:: 2.1
181181
The ``htmlPattern`` option was introduced in Symfony 2.1
182182

183-
**type**: ``string|Boolean`` **default**: null
183+
**type**: ``string|boolean`` **default**: null
184184

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

267-
**type**: ``Boolean`` default: ``true``
267+
**type**: ``boolean`` default: ``true``
268268

269269
If ``true`` (or not set), this validator will pass if the given string matches
270270
the given `pattern`_ regular expression. However, when this option is set

Diff for: reference/constraints/True.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ If the ``isTokenValid()`` returns false, the validation will fail.
120120
.. caution::
121121

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

125125
Options
126126
-------

Diff for: reference/constraints/UniqueEntity.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ Now, the message would be bound to the ``port`` field with this configuration.
257257
ignoreNull
258258
~~~~~~~~~~
259259

260-
**type**: ``Boolean`` **default**: ``true``
260+
**type**: ``boolean`` **default**: ``true``
261261

262262
.. versionadded:: 2.1
263263
The ``ignoreNull`` option was introduced in Symfony 2.1.

Diff for: reference/forms/types/checkbox.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ checkbox Field Type
55
===================
66

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

1111
+-------------+------------------------------------------------------------------------+

Diff for: reference/forms/types/choice.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ Field Variables
192192
+------------------------+--------------+-------------------------------------------------------------------+
193193
| Variable | Type | Usage |
194194
+========================+==============+===================================================================+
195-
| multiple | ``Boolean`` | The value of the `multiple`_ option. |
195+
| multiple | ``boolean`` | The value of the `multiple`_ option. |
196196
+------------------------+--------------+-------------------------------------------------------------------+
197-
| expanded | ``Boolean`` | The value of the `expanded`_ option. |
197+
| expanded | ``boolean`` | The value of the `expanded`_ option. |
198198
+------------------------+--------------+-------------------------------------------------------------------+
199199
| preferred_choices | ``array`` | A nested array containing the ``ChoiceView`` objects of |
200200
| | | choices which should be presented to the user with priority. |
@@ -210,7 +210,7 @@ Field Variables
210210
| is_selected | ``callable`` | A callable which takes a ``ChoiceView`` and the selected value(s) |
211211
| | | and returns whether the choice is in the selected value(s). |
212212
+------------------------+--------------+-------------------------------------------------------------------+
213-
| empty_value_in_choices | ``Boolean`` | Whether the empty value is in the choice list. |
213+
| empty_value_in_choices | ``boolean`` | Whether the empty value is in the choice list. |
214214
+------------------------+--------------+-------------------------------------------------------------------+
215215

216216
.. tip::

Diff for: reference/forms/types/collection.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ Field Options
214214
allow_add
215215
~~~~~~~~~
216216

217-
**type**: ``Boolean`` **default**: ``false``
217+
**type**: ``boolean`` **default**: ``false``
218218

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

238-
**type**: ``Boolean`` **default**: ``false``
238+
**type**: ``boolean`` **default**: ``false``
239239

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

283-
**type**: ``Boolean`` **default**: ``true``
283+
**type**: ``boolean`` **default**: ``true``
284284

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

362-
**type**: ``Boolean`` **default**: ``true``
362+
**type**: ``boolean`` **default**: ``true``
363363

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

@@ -379,6 +379,6 @@ Field Variables
379379
============ =========== ========================================
380380
Variable Type Usage
381381
============ =========== ========================================
382-
allow_add ``Boolean`` The value of the `allow_add`_ option.
383-
allow_delete ``Boolean`` The value of the `allow_delete`_ option.
382+
allow_add ``boolean`` The value of the `allow_add`_ option.
383+
allow_delete ``boolean`` The value of the `allow_delete`_ option.
384384
============ =========== ========================================

Diff for: reference/forms/types/options/by_reference.rst.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
by_reference
22
~~~~~~~~~~~~
33

4-
**type**: ``Boolean`` **default**: ``true``
4+
**type**: ``boolean`` **default**: ``true``
55

66
In most cases, if you have a ``name`` field, then you expect ``setName()``
77
to be called on the underlying object. In some cases, however, ``setName()``

Diff for: reference/forms/types/options/cascade_validation.rst.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cascade_validation
22
~~~~~~~~~~~~~~~~~~
33

4-
**type**: Boolean **default**: false
4+
**type**: ``boolean`` **default**: ``false``
55

66
Set this option to ``true`` to force validation on embedded form types.
77
For example, if you have a ``ProductType`` with an embedded ``CategoryType``,

Diff for: reference/forms/types/options/empty_value.rst.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ empty_value
55
Since Symfony 2.3, empty values are also supported if the ``expanded``
66
option is set to true.
77

8-
**type**: ``string`` or ``Boolean``
8+
**type**: ``string`` or ``boolean``
99

1010
This option determines whether or not a special "empty" option (e.g. "Choose an option")
1111
will appear at the top of a select widget. This option only applies if the

Diff for: reference/forms/types/options/error_bubbling.rst.inc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
error_bubbling
22
~~~~~~~~~~~~~~
33

4-
**type**: ``Boolean`` **default**: ``false`` unless the form is ``compound``
4+
**type**: ``boolean`` **default**: ``false`` unless the form is ``compound``
55

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

0 commit comments

Comments
 (0)