Description
Expose array_map or something equivalent (such as mapMethod, see below) to allow working with arrays.
function mapMethod(array $items, string $method): array {
return array_map(fn($item) => $item->$method(), $items);
}
Example
'needle' in mapMethod(myArray, `getMyField`)