| Total Complexity | 2 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php # -*- coding: utf-8 -*- |
||
| 6 | class Link extends AbstractRegexRule |
||
| 7 | { |
||
| 8 | |||
| 9 | /** |
||
| 10 | * Get the regex rule to identify the fromFile for the callback. |
||
| 11 | * Links without possibility to add javascript, XSS topic. |
||
| 12 | * |
||
| 13 | * @return string |
||
| 14 | */ |
||
| 15 | 7 | public function rule(): string |
|
| 16 | 7 | { |
|
| 17 | 7 | return '#\[([^\[]+)\]\((?:javascript:)?([^\)]+)\)(?!`)#'; |
|
| 18 | } |
||
| 19 | |||
| 20 | /** |
||
| 21 | * {@inheritdoc} |
||
| 22 | */ |
||
| 23 | 4 | public function render(array $content): string |
|
| 26 | } |
||
| 27 | } |
||
| 28 |