| Conditions | 3 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3.2098 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 45 | 3 | public function createElement(\DOMDocument $document, NodeInterface $node) |
|
| 46 | { |
||
| 47 | 3 | $description = htmlspecialchars($node->getDescription()); |
|
| 48 | 3 | $element = $document->createElement($this->getNodeName(), $description); |
|
| 49 | |||
| 50 | 3 | if ($description !== $node->getDescription() && $this->getNodeName() != 'description') { |
|
| 51 | $element->setAttribute('type', 'html'); |
||
| 52 | } |
||
| 53 | |||
| 54 | 3 | return $element; |
|
| 55 | } |
||
| 56 | } |
||
| 57 |