Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 359-366 (lines=8) @@
356
   * @return object
357
   *   The created node.
358
   */
359
    public function nodeCreate($node)
360
    {
361
        $this->dispatchHooks('BeforeNodeCreateScope', $node);
362
        $this->parseEntityFields('node', $node);
363
        $saved = $this->getDriver()->createNode($node);
364
        $this->dispatchHooks('AfterNodeCreateScope', $saved);
365
        $this->nodes[] = $saved;
366
        return $saved;
367
    }
368
369
  /**
@@ 494-501 (lines=8) @@
491
   * @return object
492
   *   The created term.
493
   */
494
    public function termCreate($term)
495
    {
496
        $this->dispatchHooks('BeforeTermCreateScope', $term);
497
        $this->parseEntityFields('taxonomy_term', $term);
498
        $saved = $this->getDriver()->createTerm($term);
499
        $this->dispatchHooks('AfterTermCreateScope', $saved);
500
        $this->terms[] = $saved;
501
        return $saved;
502
    }
503
504
  /**