Using array_filter and array_map, instead of foreach
Correcting script location in composer.json