Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/State/ProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* Retrieves data from a persistence layer.
*
* @template T of object
* @template T of object|array

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it be iterable instead of array ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right!

@rdavaillaud rdavaillaud Apr 11, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in fact, no, it's not an iterable, as it's really an array of compound data.
Like, in my case, in Doctrine Orm, I have a DQL query like SELECT o, some_scalar as somevalue ... which produce an array with the object/entity in the first array element, and the scalar in 'somevalue' array element.

So it's not an iterable.

*
* @author Antoine Bluchet <soyuka@gmail.com>
*/
Expand Down