Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 368-375 (lines=8) @@
365
   * @return object
366
   *   The created node.
367
   */
368
    public function nodeCreate($node)
369
    {
370
        $this->dispatchHooks('BeforeNodeCreateScope', $node);
371
        $this->parseEntityFields('node', $node);
372
        $saved = $this->getDriver()->createNode($node);
373
        $this->dispatchHooks('AfterNodeCreateScope', $saved);
374
        $this->nodes[] = $saved;
375
        return $saved;
376
    }
377
378
  /**
@@ 503-510 (lines=8) @@
500
   * @return object
501
   *   The created term.
502
   */
503
    public function termCreate($term)
504
    {
505
        $this->dispatchHooks('BeforeTermCreateScope', $term);
506
        $this->parseEntityFields('taxonomy_term', $term);
507
        $saved = $this->getDriver()->createTerm($term);
508
        $this->dispatchHooks('AfterTermCreateScope', $saved);
509
        $this->terms[] = $saved;
510
        return $saved;
511
    }
512
513
  /**