TidyStringFilter::filter()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 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