Code Duplication    Length = 15-15 lines in 2 locations

src/Mutation/AddNode.php 1 location

@@ 26-40 (lines=15) @@
23
    /**
24
     * {@inheritdoc}
25
     */
26
    public function process(&$data)
27
    {
28
        $this->prePersist($data);
29
        foreach ($this->extensions as $extension) {
30
            $extension->prePersist($data, $this, $this->context);
31
        }
32
33
        $this->getManager()->persist($data);
34
        $this->getManager()->flush();
35
36
        $this->postPersist($data);
37
        foreach ($this->extensions as $extension) {
38
            $extension->postPersist($data, $this, $this->context);
39
        }
40
    }
41
42
    /**
43
     * {@inheritdoc}

src/Mutation/DeleteNode.php 1 location

@@ 28-42 (lines=15) @@
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function process(&$data)
29
    {
30
        $this->preDelete($data);
31
        foreach ($this->extensions as $extension) {
32
            $extension->preDelete($data, $this, $this->context);
33
        }
34
35
        $this->getManager()->remove($data);
36
        $this->getManager()->flush();
37
38
        $this->postDelete($data);
39
        foreach ($this->extensions as $extension) {
40
            $extension->postDelete($data, $this, $this->context);
41
        }
42
    }
43
44
    /**
45
     * {@inheritdoc}