| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 9 | public function convert(ElementInterface $element) |
|
| 23 | { |
||
| 24 | 9 | $text = trim($element->getValue(), "\t\n\r\0\x0B"); |
|
| 25 | |||
| 26 | 9 | $href = $element->getAttribute('href'); |
|
| 27 | |||
| 28 | 9 | $markdown = $text . ' (' . $href . ')'; |
|
| 29 | |||
| 30 | 9 | $autolink = $this->isValidAutolink((string) $href); |
|
| 31 | |||
| 32 | 9 | $href === $text && $autolink && $markdown = $href; |
|
| 33 | |||
| 34 | 9 | return $markdown; |
|
| 35 | } |
||
| 57 |