Task/Generate.php
protected function detectExistence($component_list, $existing_module_files) {
    foreach ($component_list as $name => $component) {
      $component->detectExistence($existing_module_files);
    }
  }
protected function detectExistence($component_list, $existing_module_files) {
    foreach ($component_list as $name => $component) {
      $component->detectExistence($existing_module_files);
    }
  }
protected function detectExistence ( $ component_list , $ existing_module_files ) { foreach ( $ component_list as $ name => $ component ) { $ component -> detectExistence ( $ existing_module_files ) ; } }
Lets each component determine whether it is already in existing files.

Existence is determined at the component level, rather than the file level,
because one component may want to add to several files, and several
components may want to add to the same file. For example, a service may
exist, but other components might want to add services and therefore add
code to the services.yml file.

@param $component_list
The component list.
@param $existing_module_files
The array of existing file names.
Lets each component determine whether it is already in existing files .