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

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