Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 337-344 (lines=8) @@
334
   * @return object
335
   *   The created node.
336
   */
337
  public function nodeCreate($node) {
338
    $this->dispatchHooks('BeforeNodeCreateScope', $node);
339
    $this->parseEntityFields('node', $node);
340
    $saved = $this->getDriver()->createNode($node);
341
    $this->dispatchHooks('AfterNodeCreateScope', $saved);
342
    $this->nodes[] = $saved;
343
    return $saved;
344
  }
345
346
  /**
347
   * Parses the field values and turns them into the format expected by Drupal.
@@ 474-481 (lines=8) @@
471
   * @return object
472
   *   The created term.
473
   */
474
  public function termCreate($term) {
475
    $this->dispatchHooks('BeforeTermCreateScope', $term);
476
    $this->parseEntityFields('taxonomy_term', $term);
477
    $saved = $this->getDriver()->createTerm($term);
478
    $this->dispatchHooks('AfterTermCreateScope', $saved);
479
    $this->terms[] = $saved;
480
    return $saved;
481
  }
482
483
  /**
484
   * Creates a language.