This class 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...
17
{
18
const NODE_NAME = 'link';
19
20
/**
21
* @param NodeInterface $node
22
* @param \DOMElement $element
23
* @return mixed
24
*/
25
4
public function setProperty(NodeInterface $node, \DOMElement $element)
26
{
27
4
$node->setLink($element->nodeValue);
28
29
4
return $this;
30
}
31
32
/**
33
* @inheritDoc
34
*/
35
5
protected function hasValue(NodeInterface $node) : bool
36
{
37
5
return !! $node->getLink();
38
}
39
40
/**
41
* @inheritDoc
42
*/
43
2
protected function addElement(\DomDocument $document, \DOMElement $rootElement, NodeInterface $node) : void
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.