I want to avoid this notation:
$transactionsRows = [];
foreach ($data['invoces'] as $key => $invoice) {
$transactionsRows[] = array();
}
Could I use closure in php to fill like this:
$transactionsRows = closure_fill(/* HERE FILL ARRAY AND RETURN */);