Code Duplication    Length = 8-8 lines in 2 locations

src/Drupal/DrupalExtension/Context/RawDrupalContext.php 2 locations

@@ 376-383 (lines=8) @@
373
   * @return object
374
   *   The created node.
375
   */
376
  public function nodeCreate($node) {
377
    $this->dispatchHooks('BeforeNodeCreateScope', $node);
378
    $this->parseEntityFields('node', $node);
379
    $saved = $this->getDriver()->createNode($node);
380
    $this->dispatchHooks('AfterNodeCreateScope', $saved);
381
    $this->nodes[] = $saved;
382
    return $saved;
383
  }
384
385
  /**
386
   * Parse multi-value fields. Possible formats:
@@ 484-491 (lines=8) @@
481
   * @return object
482
   *   The created term.
483
   */
484
  public function termCreate($term) {
485
    $this->dispatchHooks('BeforeTermCreateScope', $term);
486
    $this->parseEntityFields('taxonomy_term', $term);
487
    $saved = $this->getDriver()->createTerm($term);
488
    $this->dispatchHooks('AfterTermCreateScope', $saved);
489
    $this->terms[] = $saved;
490
    return $saved;
491
  }
492
493
  /**
494
   * Creates a language.