Code Duplication    Length = 5-5 lines in 2 locations

modules/commons/commons_groups/commons_groups.module 1 location

@@ 455-459 (lines=5) @@
452
  // independently of Commons Groups.
453
  $commons_entity_integrations = &drupal_static(__FUNCTION__);
454
455
  if (!isset($commons_entity_integrations)) {
456
    foreach (module_implements('commons_entity_integration') as $module) {
457
      $commons_entity_integrations[$module] = call_user_func($module . '_commons_entity_integration');
458
    }
459
  }
460
461
  if (isset($commons_entity_integrations[$file->name])) {
462
    foreach ($commons_entity_integrations[$file->name] as $entity_type => $integration) {

modules/commons/commons_media/commons_media.module 1 location

@@ 37-41 (lines=5) @@
34
  // independently of Commons Media.
35
  $commons_entity_integrations = &drupal_static(__FUNCTION__);
36
37
  if (!isset($commons_entity_integrations)) {
38
    foreach (module_implements('commons_entity_integration') as $module) {
39
      $commons_entity_integrations[$module] = call_user_func($module . '_commons_entity_integration');
40
    }
41
  }
42
43
  if (isset($commons_entity_integrations[$file->name])) {
44
    foreach ($commons_entity_integrations[$file->name] as $entity_type => $integration) {