This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
46
{
47
if (null === $node->getName()) {
48
throw new \Exception("Use the create<nodetype>Node on document!");
49
}
50
51
if (null === $node->getDocument() || $this->getDocument() !== $node->getDocument()) {
52
throw new \Exception("Use the create<nodetype>Node on document!");
53
}
54
}
55
56
/**
57
* @param AbstractElement $node
58
*/
59
protected function removeNodeFromParent(AbstractElement $node)
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.