Passed
Push — master ( 87f3db...2efc06 )
by Rougin
02:07
created

TableDataConverter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 21
ccs 2
cts 4
cp 0.5
rs 10
c 0
b 0
f 0
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
    public function convert(ElementInterface $element)
17
    {
18
        return $element->getValue();
19
    }
20
21
    /**
22
     * Returns the supported HTML tags.
23
     *
24
     * @return string[]
25
     */
26 12
    public function getSupportedTags()
27
    {
28 12
        return array('td');
29
    }
30
}
31