Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 390-397 (lines=8) @@
387
   * @return object
388
   *   The created node.
389
   */
390
  public function nodeCreate($node) {
391
    $this->dispatchHooks('BeforeNodeCreateScope', $node);
392
    $this->parseEntityFields('node', $node);
393
    $saved = $this->getDriver()->createNode($node);
394
    $this->dispatchHooks('AfterNodeCreateScope', $saved);
395
    $this->nodes[] = $saved;
396
    return $saved;
397
  }
398
399
  /**
400
   * Parse multi-value fields. Possible formats:
@@ 498-505 (lines=8) @@
495
   * @return object
496
   *   The created term.
497
   */
498
  public function termCreate($term) {
499
    $this->dispatchHooks('BeforeTermCreateScope', $term);
500
    $this->parseEntityFields('taxonomy_term', $term);
501
    $saved = $this->getDriver()->createTerm($term);
502
    $this->dispatchHooks('AfterTermCreateScope', $saved);
503
    $this->terms[] = $saved;
504
    return $saved;
505
  }
506
507
  /**
508
   * Creates a language.