Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 344-351 (lines=8) @@
341
   */
342
  public function termCreate(\stdClass $term) {
343
    // Map vocabulary names to vid, these take precedence over machine names.
344
    if (!isset($term->vid)) {
345
      $vocabularies = \taxonomy_get_vocabularies();
346
      foreach ($vocabularies as $vid => $vocabulary) {
347
        if ($vocabulary->name == $term->vocabulary_machine_name) {
348
          $term->vid = $vocabulary->vid;
349
        }
350
      }
351
    }
352
353
    if (!isset($term->vid)) {
354

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