| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | protected function element(array $Element) { |
||
| 21 | $markup = parent::element($Element); |
||
| 22 | |||
| 23 | if (!isset($Element['attributes']['href'])) { |
||
| 24 | return $markup; |
||
| 25 | } |
||
| 26 | |||
| 27 | $href = $Element['attributes']['href']; |
||
| 28 | |||
| 29 | if (strpos($href, '*') !== 0) { |
||
| 30 | return $markup; |
||
| 31 | } |
||
| 32 | |||
| 33 | $href = substr($href, 1); |
||
| 34 | return "<a href='$href' target='_blank' rel='noreferrer noopener'>{$Element['text']}</a>"; |
||
| 35 | } |
||
| 36 | } |
||
| 37 |