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

@@ 378-385 (lines=8) @@
375
   */
376
  public function termCreate(\stdClass $term) {
377
    // Map vocabulary names to vid, these take precedence over machine names.
378
    if (!isset($term->vid)) {
379
      $vocabularies = \taxonomy_get_vocabularies();
380
      foreach ($vocabularies as $vid => $vocabulary) {
381
        if ($vocabulary->name == $term->vocabulary_machine_name) {
382
          $term->vid = $vocabulary->vid;
383
        }
384
      }
385
    }
386
387
    if (!isset($term->vid)) {
388