| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | protected function setUp() |
||
| 40 | { |
||
| 41 | if (isset($this->configurator->tags[$this->tagName])) |
||
| 42 | { |
||
| 43 | return; |
||
| 44 | } |
||
| 45 | |||
| 46 | // Create a tag |
||
| 47 | $tag = $this->configurator->tags->add($this->tagName); |
||
| 48 | |||
| 49 | // Add an attribute using the default email filter |
||
| 50 | $filter = $this->configurator->attributeFilters->get('#email'); |
||
| 51 | $tag->attributes->add($this->attrName)->filterChain->append($filter); |
||
| 52 | |||
| 53 | // Set the default template |
||
| 54 | $tag->template = '<a href="mailto:{@' . $this->attrName . '}"><xsl:apply-templates/></a>'; |
||
| 55 | } |
||
| 56 | } |