Skip to content

Commit bfb24c5

Browse files
committed
Fix up some common signatures.
1 parent c6a8402 commit bfb24c5

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

en/orm/deleting-data.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Deleting Data
66
.. php:class:: Table
77
:noindex:
88

9-
.. php:method:: delete(Entity $entity, $options = [])
9+
.. php:method:: delete(EntityInterface $entity, array $options = [])
1010
1111
Once you've loaded an entity you can delete it by calling the originating
1212
table's delete method::
@@ -65,7 +65,7 @@ these options enabled would be::
6565
Bulk Deletes
6666
------------
6767

68-
.. php:method:: deleteMany($entities, $options = [])
68+
.. php:method:: deleteMany(iterable $entities, array $options = [])
6969
7070
If you have an array of entities you want to delete you can use ``deleteMany()``
7171
to delete them in a single transaction::
@@ -86,7 +86,7 @@ In these cases it is more performant to use a bulk-delete to remove many rows at
8686
once::
8787

8888
// Delete all the spam
89-
function destroySpam()
89+
public function destroySpam()
9090
{
9191
return $this->deleteAll(['is_spam' => true]);
9292
}
@@ -103,7 +103,7 @@ function returns the number of deleted records as an integer.
103103
Strict Deletes
104104
--------------
105105

106-
.. php:method:: deleteOrFail($entity, $options = [])
106+
.. php:method:: deleteOrFail(EntityInterface $entity, array $options = [])
107107
108108
Using this method will throw an
109109
:php:exc:`Cake\\ORM\\Exception\\PersistenceFailedException` if:

en/orm/saving-data.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ would not normally be able to.
11361136
Strict Saving
11371137
=============
11381138

1139-
.. php:method:: saveOrFail($entity, $options = [])
1139+
.. php:method:: saveOrFail(EntityInterface $entity, array $options = [])
11401140
11411141
Using this method will throw an
11421142
:php:exc:`Cake\\ORM\\Exception\\PersistenceFailedException` if:
@@ -1222,7 +1222,7 @@ Instead, assign the primary key and then patch in the remaining entity data::
12221222
Saving Multiple Entities
12231223
========================
12241224

1225-
.. php:method:: saveMany($entities, $options = [])
1225+
.. php:method:: saveMany(iterable $entities, array $options = [])
12261226
12271227
Using this method you can save multiple entities atomically. ``$entities`` can
12281228
be an array of entities created using ``newEntities()`` / ``patchEntities()``.

en/views/helpers/form.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,7 +1596,7 @@ use::
15961596
Creating Date & Time Related Controls
15971597
-------------------------------------
15981598

1599-
.. php:method:: dateTime($fieldName, $options = [])
1599+
.. php:method:: dateTime(string $fieldName, array $options = [])
16001600
16011601
* ``$fieldName`` - A string that will be used as a prefix for the HTML ``name``
16021602
attribute of the ``select`` elements.
@@ -1630,7 +1630,7 @@ Output:
16301630
Creating Date Controls
16311631
~~~~~~~~~~~~~~~~~~~~~~
16321632

1633-
.. php:method:: date($fieldName, $options = [])
1633+
.. php:method:: date(string $fieldName, array $options = [])
16341634
16351635
* ``$fieldName`` - A field name that will be used as a prefix for the HTML
16361636
``name`` attribute of the ``select`` elements.
@@ -1652,7 +1652,7 @@ Output:
16521652
Creating Time Controls
16531653
~~~~~~~~~~~~~~~~~~~~~~
16541654

1655-
.. php:method:: time($fieldName, $options = [])
1655+
.. php:method:: time(string $fieldName, array $options = [])
16561656
16571657
* ``$fieldName`` - A field name that will be used as a prefix for the HTML
16581658
``name`` attribute of the ``select`` elements.
@@ -2333,7 +2333,7 @@ Generating Entire Forms
23332333
Creating Multiple Controls
23342334
--------------------------
23352335

2336-
.. php:method:: controls(array $fields = [], $options = [])
2336+
.. php:method:: controls(array $fields = [], array $options = [])
23372337
23382338
* ``$fields`` - An array of fields to generate. Allows setting
23392339
custom types, labels and other options for each specified field.

en/views/helpers/html.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ and also wanted to include **webroot/js/Blog.plugins.js**, you would::
532532
Creating Inline Javascript Blocks
533533
---------------------------------
534534

535-
.. php:method:: scriptBlock($code, $options = [])
535+
.. php:method:: scriptBlock(string $code, array $options = [])
536536
537537
To generate Javascript blocks from PHP view code, you can use one of the script
538538
block methods. Scripts can either be output in place, or buffered into a block::
@@ -543,7 +543,7 @@ block methods. Scripts can either be output in place, or buffered into a block::
543543
// Buffer a script block to be output later.
544544
$this->Html->scriptBlock('alert("hi")', ['block' => true]);
545545

546-
.. php:method:: scriptStart($options = [])
546+
.. php:method:: scriptStart(array $options = [])
547547
.. php:method:: scriptEnd()
548548
549549
You can use the ``scriptStart()`` method to create a capturing block that will

0 commit comments

Comments
 (0)