TidyStringFilter   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A filter() 0 10 1
1
<?php
2
3
4
namespace CultuurNet\UDB3\StringFilter;
5
6
class TidyStringFilter implements StringFilterInterface
7
{
8
    public function filter($string)
9
    {
10
        $config = array('show-body-only' => true);
11
12
        /** @var \tidy $tidy */
13
        $tidy = tidy_parse_string($string, $config, 'UTF8');
14
        $tidy->cleanRepair();
15
16
        return tidy_get_output($tidy);
17
    }
18
}
19