TableDataConverter   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 21
ccs 4
cts 4
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSupportedTags() 0 3 1
A convert() 0 3 1
1
<?php
2
3
namespace Pilipinews\Common\Converters;
4
5
use League\HTMLToMarkdown\Converter\ConverterInterface;
6
use League\HTMLToMarkdown\ElementInterface;
7
8
class TableDataConverter implements ConverterInterface
9
{
10
    /**
11
     * Converts the specified element into a parsed string.
12
     *
13
     * @param  \League\HTMLToMarkdown\ElementInterface $element
14
     * @return string
15
     */
16 3
    public function convert(ElementInterface $element)
17
    {
18 3
        return trim($element->getValue());
19
    }
20
21
    /**
22
     * Returns the supported HTML tags.
23
     *
24
     * @return string[]
25
     */
26 15
    public function getSupportedTags()
27
    {
28 15
        return array('td');
29
    }
30
}
31