@Crell Why would you hint for something that you don't use? 😇
Though: As long as PHP doesn't understand stdClass[] as a type, I'd probably still want to have that. And iterable as type isn't better than array in that case...
But I'm usually using self-defined lists-classes in those cases anyhow, so 🤷
@Crell “An IDE can provide auto-completion for the properties you've defined.” @phpstorm can do that for the returned array as well if you put it in phpdocs.
@Hipska@phpstorm Oh good, so provide the structure in a totally different syntax that the engine cannot lint for you (a separate tool is needed), and can easily get out of sync without errors. And uses twice the memory of a class.
Add comment