For PHP static analysers, what's the best way to handle a method that takes a list of object-like-arrays, adds a known new key to each, and returns the list?

eg
https://psalm.dev/r/68a894d26d
https://phpstan.org/r/5edc07eb-466d-4456-b675-bfba9ee8ee54

Psalm - a static analysis tool for PHP

It feels like a "generics" problem?