| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | 1 | public function visit(\DOMAttr $att, Compiler $context) |
|
| 15 | { |
||
| 16 | 1 | $node = $att->ownerElement; |
|
| 17 | |||
| 18 | 1 | $pi = $context->createControlNode("set " . html_entity_decode($att->value)); |
|
| 19 | 1 | $node->parentNode->insertBefore($pi, $node); |
|
| 20 | |||
| 21 | 1 | $pi = $context->createControlNode("endset"); |
|
| 22 | |||
| 23 | 1 | $node->parentNode->insertBefore($pi, $node->nextSibling); // insert after |
|
| 24 | |||
| 25 | 1 | $node->removeAttributeNode($att); |
|
| 26 | 1 | } |
|
| 27 | } |
||
| 28 |