function make_normalize_info

8.0.x make.utilities.inc make_normalize_info(&$info)
7.x make.utilities.inc make_normalize_info(&$info)
master make.utilities.inc make_normalize_info(&$info)

Expand shorthand elements, so that we have an associative array.

1 call to make_normalize_info()
_make_parse_info_file in commands/make/make.utilities.inc
Parse makefile recursively.

File

commands/make/make.utilities.inc, line 101
General utility functions for Drush Make.

Code

function make_normalize_info(&$info) {
  foreach ($info['projects'] as $key => $project) {
    if (is_numeric($key) && is_string($project)) {
      unset($info['projects'][$key]);
      $info['projects'][$project] = array(
        'version' => '',
      );
    }
    if (is_string($key) && is_numeric($project)) {
      $info['projects'][$key] = array(
        'version' => $project,
      );
    }
  }
}