Code Duplication    Length = 8-8 lines in 2 locations

src/Drupal/Driver/Cores/Drupal6.php 1 location

@@ 335-342 (lines=8) @@
332
   */
333
  public function termCreate(\stdClass $term) {
334
    // Map vocabulary names to vid, these take precedence over machine names.
335
    if (!isset($term->vid)) {
336
      $vocabularies = \taxonomy_get_vocabularies();
337
      foreach ($vocabularies as $vid => $vocabulary) {
338
        if ($vocabulary->name == $term->vocabulary_machine_name) {
339
          $term->vid = $vocabulary->vid;
340
        }
341
      }
342
    }
343
344
    if (!isset($term->vid)) {
345

src/Drupal/Driver/Cores/Drupal7.php 1 location

@@ 351-358 (lines=8) @@
348
   */
349
  public function termCreate(\stdClass $term) {
350
    // Map vocabulary names to vid, these take precedence over machine names.
351
    if (!isset($term->vid)) {
352
      $vocabularies = \taxonomy_get_vocabularies();
353
      foreach ($vocabularies as $vid => $vocabulary) {
354
        if ($vocabulary->name == $term->vocabulary_machine_name) {
355
          $term->vid = $vocabulary->vid;
356
        }
357
      }
358
    }
359
360
    if (!isset($term->vid)) {
361