Skip to content

Commit

Permalink
Merge pull request #16651 from cakephp/bugfix/annotations-generic
Browse files Browse the repository at this point in the history
Fix up generic docblocks.
  • Loading branch information
markstory committed Jul 29, 2022
2 parents da7c5ed + 00fa6c1 commit 44c9269
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/Datasource/RepositoryInterface.php
Expand Up @@ -242,7 +242,7 @@ public function patchEntity(EntityInterface $entity, array $data, array $options
* $article = $this->Articles->patchEntities($articles, $this->request->getData());
* ```
*
* @param \Traversable|array<\Cake\Datasource\EntityInterface> $entities the entities that will get the
* @param iterable<\Cake\Datasource\EntityInterface> $entities the entities that will get the
* data merged in
* @param array $data list of arrays to be merged into the entities
* @param array<string, mixed> $options A list of options for the objects hydration.
Expand Down
4 changes: 2 additions & 2 deletions src/ORM/LazyEagerLoader.php
Expand Up @@ -135,11 +135,11 @@ protected function _getPropertyMap(Table $source, array $associations): array
* Injects the results of the eager loader query into the original list of
* entities.
*
* @param \Traversable|array<\Cake\Datasource\EntityInterface> $objects The original list of entities
* @param iterable<\Cake\Datasource\EntityInterface> $objects The original list of entities
* @param \Cake\ORM\Query $results The loaded results
* @param array<string> $associations The top level associations that were loaded
* @param \Cake\ORM\Table $source The table where the entities came from
* @return array
* @return array<\Cake\Datasource\EntityInterface>
*/
protected function _injectResults(iterable $objects, $results, array $associations, Table $source): array
{
Expand Down
24 changes: 12 additions & 12 deletions src/ORM/Table.php
Expand Up @@ -2178,9 +2178,9 @@ protected function _update(EntityInterface $entity, array $data)
* any one of the records fails to save due to failed validation or database
* error.
*
* @param \Cake\Datasource\ResultSetInterface|array<\Cake\Datasource\EntityInterface> $entities Entities to save.
* @param iterable<\Cake\Datasource\EntityInterface> $entities Entities to save.
* @param \Cake\ORM\SaveOptionsBuilder|\ArrayAccess|array $options Options used when calling Table::save() for each entity.
* @return \Cake\Datasource\ResultSetInterface|array<\Cake\Datasource\EntityInterface>|false False on failure, entities list on success.
* @return iterable<\Cake\Datasource\EntityInterface>|false False on failure, entities list on success.
* @throws \Exception
*/
public function saveMany(iterable $entities, $options = [])
Expand All @@ -2199,9 +2199,9 @@ public function saveMany(iterable $entities, $options = [])
* any one of the records fails to save due to failed validation or database
* error.
*
* @param \Cake\Datasource\ResultSetInterface|array<\Cake\Datasource\EntityInterface> $entities Entities to save.
* @param iterable<\Cake\Datasource\EntityInterface> $entities Entities to save.
* @param \ArrayAccess|array $options Options used when calling Table::save() for each entity.
* @return \Cake\Datasource\ResultSetInterface|array<\Cake\Datasource\EntityInterface> Entities list.
* @return iterable<\Cake\Datasource\EntityInterface> Entities list.
* @throws \Exception
* @throws \Cake\ORM\Exception\PersistenceFailedException If an entity couldn't be saved.
*/
Expand All @@ -2211,11 +2211,11 @@ public function saveManyOrFail(iterable $entities, $options = []): iterable
}

/**
* @param \Cake\Datasource\ResultSetInterface|array<\Cake\Datasource\EntityInterface> $entities Entities to save.
* @param iterable<\Cake\Datasource\EntityInterface> $entities Entities to save.
* @param \Cake\ORM\SaveOptionsBuilder|\ArrayAccess|array $options Options used when calling Table::save() for each entity.
* @throws \Cake\ORM\Exception\PersistenceFailedException If an entity couldn't be saved.
* @throws \Exception If an entity couldn't be saved.
* @return \Cake\Datasource\ResultSetInterface|array<\Cake\Datasource\EntityInterface> Entities list.
* @return iterable<\Cake\Datasource\EntityInterface> Entities list.
*/
protected function _saveMany(iterable $entities, $options = []): iterable
{
Expand Down Expand Up @@ -2359,9 +2359,9 @@ public function delete(EntityInterface $entity, $options = []): bool
* any one of the records fails to delete due to failed validation or database
* error.
*
* @param \Cake\Datasource\ResultSetInterface|array<\Cake\Datasource\EntityInterface> $entities Entities to delete.
* @param iterable<\Cake\Datasource\EntityInterface> $entities Entities to delete.
* @param \ArrayAccess|array $options Options used when calling Table::save() for each entity.
* @return \Cake\Datasource\ResultSetInterface|array<\Cake\Datasource\EntityInterface>|false Entities list
* @return iterable<\Cake\Datasource\EntityInterface>|false Entities list
* on success, false on failure.
* @see \Cake\ORM\Table::delete() for options and events related to this method.
*/
Expand All @@ -2383,9 +2383,9 @@ public function deleteMany(iterable $entities, $options = [])
* any one of the records fails to delete due to failed validation or database
* error.
*
* @param \Cake\Datasource\ResultSetInterface|array<\Cake\Datasource\EntityInterface> $entities Entities to delete.
* @param iterable<\Cake\Datasource\EntityInterface> $entities Entities to delete.
* @param \ArrayAccess|array $options Options used when calling Table::save() for each entity.
* @return \Cake\Datasource\ResultSetInterface|array<\Cake\Datasource\EntityInterface> Entities list.
* @return iterable<\Cake\Datasource\EntityInterface> Entities list.
* @throws \Cake\ORM\Exception\PersistenceFailedException
* @see \Cake\ORM\Table::delete() for options and events related to this method.
*/
Expand All @@ -2401,7 +2401,7 @@ public function deleteManyOrFail(iterable $entities, $options = []): iterable
}

/**
* @param \Cake\Datasource\ResultSetInterface|array<\Cake\Datasource\EntityInterface> $entities Entities to delete.
* @param iterable<\Cake\Datasource\EntityInterface> $entities Entities to delete.
* @param \ArrayAccess|array $options Options used.
* @return \Cake\Datasource\EntityInterface|null
*/
Expand Down Expand Up @@ -2903,7 +2903,7 @@ public function patchEntity(EntityInterface $entity, array $data, array $options
* You can use the `Model.beforeMarshal` event to modify request data
* before it is converted into entities.
*
* @param \Traversable|array<\Cake\Datasource\EntityInterface> $entities the entities that will get the
* @param iterable<\Cake\Datasource\EntityInterface> $entities the entities that will get the
* data merged in
* @param array $data list of arrays to be merged into the entities
* @param array<string, mixed> $options A list of options for the objects hydration.
Expand Down

0 comments on commit 44c9269

Please sign in to comment.