@@ -2174,9 +2174,9 @@ protected function _update(EntityInterface $entity, array $data)
2174
2174
* any one of the records fails to save due to failed validation or database
2175
2175
* error.
2176
2176
*
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.
2178
2178
* @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.
2180
2180
* @throws \Exception
2181
2181
*/
2182
2182
public function saveMany (iterable $ entities , $ options = [])
@@ -2195,9 +2195,9 @@ public function saveMany(iterable $entities, $options = [])
2195
2195
* any one of the records fails to save due to failed validation or database
2196
2196
* error.
2197
2197
*
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.
2199
2199
* @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.
2201
2201
* @throws \Exception
2202
2202
* @throws \Cake\ORM\Exception\PersistenceFailedException If an entity couldn't be saved.
2203
2203
*/
@@ -2207,11 +2207,11 @@ public function saveManyOrFail(iterable $entities, $options = []): iterable
2207
2207
}
2208
2208
2209
2209
/**
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.
2211
2211
* @param array|\ArrayAccess|\Cake\ORM\SaveOptionsBuilder $options Options used when calling Table::save() for each entity.
2212
2212
* @throws \Cake\ORM\Exception\PersistenceFailedException If an entity couldn't be saved.
2213
2213
* @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.
2215
2215
*/
2216
2216
protected function _saveMany (iterable $ entities , $ options = []): iterable
2217
2217
{
@@ -2226,7 +2226,7 @@ protected function _saveMany(iterable $entities, $options = []): iterable
2226
2226
/** @var bool[] $isNew */
2227
2227
$ isNew = [];
2228
2228
$ cleanup = function ($ entities ) use (&$ isNew ): void {
2229
- /** @var \Cake\Datasource\EntityInterface[] $entities */
2229
+ /** @var array< \Cake\Datasource\EntityInterface> $entities */
2230
2230
foreach ($ entities as $ key => $ entity ) {
2231
2231
if (isset ($ isNew [$ key ]) && $ isNew [$ key ]) {
2232
2232
$ entity ->unset ($ this ->getPrimaryKey ());
@@ -2329,9 +2329,9 @@ public function delete(EntityInterface $entity, $options = []): bool
2329
2329
* any one of the records fails to delete due to failed validation or database
2330
2330
* error.
2331
2331
*
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.
2333
2333
* @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
2335
2335
* on success, false on failure.
2336
2336
* @see \Cake\ORM\Table::delete() for options and events related to this method.
2337
2337
*/
@@ -2353,9 +2353,9 @@ public function deleteMany(iterable $entities, $options = [])
2353
2353
* any one of the records fails to delete due to failed validation or database
2354
2354
* error.
2355
2355
*
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.
2357
2357
* @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.
2359
2359
* @throws \Cake\ORM\Exception\PersistenceFailedException
2360
2360
* @see \Cake\ORM\Table::delete() for options and events related to this method.
2361
2361
*/
@@ -2371,7 +2371,7 @@ public function deleteManyOrFail(iterable $entities, $options = []): iterable
2371
2371
}
2372
2372
2373
2373
/**
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.
2375
2375
* @param array|\ArrayAccess $options Options used.
2376
2376
* @return \Cake\Datasource\EntityInterface|null
2377
2377
*/
@@ -2781,7 +2781,7 @@ public function newEntity(array $data, array $options = []): EntityInterface
2781
2781
*
2782
2782
* @param array $data The data to build an entity with.
2783
2783
* @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.
2785
2785
*/
2786
2786
public function newEntities (array $ data , array $ options = []): array
2787
2787
{
@@ -2879,11 +2879,11 @@ public function patchEntity(EntityInterface $entity, array $data, array $options
2879
2879
* You can use the `Model.beforeMarshal` event to modify request data
2880
2880
* before it is converted into entities.
2881
2881
*
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
2883
2883
* data merged in
2884
2884
* @param array $data list of arrays to be merged into the entities
2885
2885
* @param array $options A list of options for the objects hydration.
2886
- * @return \Cake\Datasource\EntityInterface[]
2886
+ * @return array< \Cake\Datasource\EntityInterface>
2887
2887
*/
2888
2888
public function patchEntities (iterable $ entities , array $ data , array $ options = []): array
2889
2889
{
@@ -3060,10 +3060,10 @@ public function getSaveOptionsBuilder(array $options = []): SaveOptionsBuilder
3060
3060
*
3061
3061
* The properties for the associations to be loaded will be overwritten on each entity.
3062
3062
*
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
3064
3064
* @param array $contain A `contain()` compatible array.
3065
3065
* @see \Cake\ORM\Query::contain()
3066
- * @return \Cake\Datasource\EntityInterface|\Cake\Datasource\EntityInterface[]
3066
+ * @return \Cake\Datasource\EntityInterface|array< \Cake\Datasource\EntityInterface>
3067
3067
*/
3068
3068
public function loadInto ($ entities , array $ contain )
3069
3069
{
0 commit comments