Total Complexity | 3 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
14 | class ImageConverter implements ConverterInterface |
||
15 | { |
||
16 | /** |
||
17 | * Converts the specified element into a parsed string. |
||
18 | * |
||
19 | * @param \League\HTMLToMarkdown\ElementInterface $element |
||
20 | * @return string |
||
21 | */ |
||
22 | 3 | public function convert(ElementInterface $element) |
|
23 | { |
||
24 | 3 | if (! $source = $element->getAttribute('src')) |
|
25 | 2 | { |
|
26 | 3 | return ''; |
|
27 | } |
||
28 | |||
29 | 3 | return "\n\nPHOTO: " . $source . "\n\n"; |
|
30 | } |
||
31 | |||
32 | /** |
||
33 | * Returns the supported HTML tags. |
||
34 | * |
||
35 | * @return string[] |
||
36 | */ |
||
37 | 12 | public function getSupportedTags() |
|
40 | } |
||
41 | } |
||
42 |