Code Duplication    Length = 8-8 lines in 2 locations

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

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

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

@@ 285-292 (lines=8) @@
282
   */
283
  public function termCreate(\stdClass $term) {
284
    // Map vocabulary names to vid, these take precedence over machine names.
285
    if (!isset($term->vid)) {
286
      $vocabularies = \taxonomy_get_vocabularies();
287
      foreach ($vocabularies as $vid => $vocabulary) {
288
        if ($vocabulary->name == $term->vocabulary_machine_name) {
289
          $term->vid = $vocabulary->vid;
290
        }
291
      }
292
    }
293
294
    if (!isset($term->vid)) {
295