Skip to content

Commit b0d9eff

Browse files
committed
Update types in docblocks.
Refs #15524, #15525.
1 parent 7979875 commit b0d9eff

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

Table.php

+17-17
Original file line numberDiff line numberDiff line change
@@ -2174,9 +2174,9 @@ protected function _update(EntityInterface $entity, array $data)
21742174
* any one of the records fails to save due to failed validation or database
21752175
* error.
21762176
*
2177-
* @param \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface $entities Entities to save.
2177+
* @param array<\Cake\Datasource\EntityInterface>|\Cake\Datasource\ResultSetInterface $entities Entities to save.
21782178
* @param array|\ArrayAccess|\Cake\ORM\SaveOptionsBuilder $options Options used when calling Table::save() for each entity.
2179-
* @return \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface|false False on failure, entities list on success.
2179+
* @return array<\Cake\Datasource\EntityInterface>|\Cake\Datasource\ResultSetInterface|false False on failure, entities list on success.
21802180
* @throws \Exception
21812181
*/
21822182
public function saveMany(iterable $entities, $options = [])
@@ -2195,9 +2195,9 @@ public function saveMany(iterable $entities, $options = [])
21952195
* any one of the records fails to save due to failed validation or database
21962196
* error.
21972197
*
2198-
* @param \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface $entities Entities to save.
2198+
* @param array<\Cake\Datasource\EntityInterface>|\Cake\Datasource\ResultSetInterface $entities Entities to save.
21992199
* @param array|\ArrayAccess $options Options used when calling Table::save() for each entity.
2200-
* @return \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface Entities list.
2200+
* @return array<\Cake\Datasource\EntityInterface>|\Cake\Datasource\ResultSetInterface Entities list.
22012201
* @throws \Exception
22022202
* @throws \Cake\ORM\Exception\PersistenceFailedException If an entity couldn't be saved.
22032203
*/
@@ -2207,11 +2207,11 @@ public function saveManyOrFail(iterable $entities, $options = []): iterable
22072207
}
22082208

22092209
/**
2210-
* @param \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface $entities Entities to save.
2210+
* @param array<\Cake\Datasource\EntityInterface>|\Cake\Datasource\ResultSetInterface $entities Entities to save.
22112211
* @param array|\ArrayAccess|\Cake\ORM\SaveOptionsBuilder $options Options used when calling Table::save() for each entity.
22122212
* @throws \Cake\ORM\Exception\PersistenceFailedException If an entity couldn't be saved.
22132213
* @throws \Exception If an entity couldn't be saved.
2214-
* @return \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface Entities list.
2214+
* @return array<\Cake\Datasource\EntityInterface>|\Cake\Datasource\ResultSetInterface Entities list.
22152215
*/
22162216
protected function _saveMany(iterable $entities, $options = []): iterable
22172217
{
@@ -2226,7 +2226,7 @@ protected function _saveMany(iterable $entities, $options = []): iterable
22262226
/** @var bool[] $isNew */
22272227
$isNew = [];
22282228
$cleanup = function ($entities) use (&$isNew): void {
2229-
/** @var \Cake\Datasource\EntityInterface[] $entities */
2229+
/** @var array<\Cake\Datasource\EntityInterface> $entities */
22302230
foreach ($entities as $key => $entity) {
22312231
if (isset($isNew[$key]) && $isNew[$key]) {
22322232
$entity->unset($this->getPrimaryKey());
@@ -2329,9 +2329,9 @@ public function delete(EntityInterface $entity, $options = []): bool
23292329
* any one of the records fails to delete due to failed validation or database
23302330
* error.
23312331
*
2332-
* @param \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface $entities Entities to delete.
2332+
* @param array<\Cake\Datasource\EntityInterface>|\Cake\Datasource\ResultSetInterface $entities Entities to delete.
23332333
* @param array|\ArrayAccess $options Options used when calling Table::save() for each entity.
2334-
* @return \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface|false Entities list
2334+
* @return array<\Cake\Datasource\EntityInterface>|\Cake\Datasource\ResultSetInterface|false Entities list
23352335
* on success, false on failure.
23362336
* @see \Cake\ORM\Table::delete() for options and events related to this method.
23372337
*/
@@ -2353,9 +2353,9 @@ public function deleteMany(iterable $entities, $options = [])
23532353
* any one of the records fails to delete due to failed validation or database
23542354
* error.
23552355
*
2356-
* @param \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface $entities Entities to delete.
2356+
* @param array<\Cake\Datasource\EntityInterface>|\Cake\Datasource\ResultSetInterface $entities Entities to delete.
23572357
* @param array|\ArrayAccess $options Options used when calling Table::save() for each entity.
2358-
* @return \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface Entities list.
2358+
* @return array<\Cake\Datasource\EntityInterface>|\Cake\Datasource\ResultSetInterface Entities list.
23592359
* @throws \Cake\ORM\Exception\PersistenceFailedException
23602360
* @see \Cake\ORM\Table::delete() for options and events related to this method.
23612361
*/
@@ -2371,7 +2371,7 @@ public function deleteManyOrFail(iterable $entities, $options = []): iterable
23712371
}
23722372

23732373
/**
2374-
* @param \Cake\Datasource\EntityInterface[]|\Cake\Datasource\ResultSetInterface $entities Entities to delete.
2374+
* @param array<\Cake\Datasource\EntityInterface>|\Cake\Datasource\ResultSetInterface $entities Entities to delete.
23752375
* @param array|\ArrayAccess $options Options used.
23762376
* @return \Cake\Datasource\EntityInterface|null
23772377
*/
@@ -2781,7 +2781,7 @@ public function newEntity(array $data, array $options = []): EntityInterface
27812781
*
27822782
* @param array $data The data to build an entity with.
27832783
* @param array $options A list of options for the objects hydration.
2784-
* @return \Cake\Datasource\EntityInterface[] An array of hydrated records.
2784+
* @return array<\Cake\Datasource\EntityInterface> An array of hydrated records.
27852785
*/
27862786
public function newEntities(array $data, array $options = []): array
27872787
{
@@ -2879,11 +2879,11 @@ public function patchEntity(EntityInterface $entity, array $data, array $options
28792879
* You can use the `Model.beforeMarshal` event to modify request data
28802880
* before it is converted into entities.
28812881
*
2882-
* @param \Cake\Datasource\EntityInterface[]|\Traversable $entities the entities that will get the
2882+
* @param array<\Cake\Datasource\EntityInterface>|\Traversable $entities the entities that will get the
28832883
* data merged in
28842884
* @param array $data list of arrays to be merged into the entities
28852885
* @param array $options A list of options for the objects hydration.
2886-
* @return \Cake\Datasource\EntityInterface[]
2886+
* @return array<\Cake\Datasource\EntityInterface>
28872887
*/
28882888
public function patchEntities(iterable $entities, array $data, array $options = []): array
28892889
{
@@ -3060,10 +3060,10 @@ public function getSaveOptionsBuilder(array $options = []): SaveOptionsBuilder
30603060
*
30613061
* The properties for the associations to be loaded will be overwritten on each entity.
30623062
*
3063-
* @param \Cake\Datasource\EntityInterface|\Cake\Datasource\EntityInterface[] $entities a single entity or list of entities
3063+
* @param \Cake\Datasource\EntityInterface|array<\Cake\Datasource\EntityInterface> $entities a single entity or list of entities
30643064
* @param array $contain A `contain()` compatible array.
30653065
* @see \Cake\ORM\Query::contain()
3066-
* @return \Cake\Datasource\EntityInterface|\Cake\Datasource\EntityInterface[]
3066+
* @return \Cake\Datasource\EntityInterface|array<\Cake\Datasource\EntityInterface>
30673067
*/
30683068
public function loadInto($entities, array $contain)
30693069
{

0 commit comments

Comments
 (0)