Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 3 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
32 | 10 | public function clean($html) |
|
33 | 10 | { |
|
34 | // Tokenize |
||
35 | 10 | $tokenizer = new Tokenizer($this->configuration); |
|
36 | 10 | $tokens = $tokenizer->tokenize($html); |
|
37 | |||
38 | // Clean |
||
39 | 10 | foreach ($tokens as $token) { |
|
40 | 10 | $token->validate($this->configuration); |
|
41 | 10 | } |
|
42 | |||
43 | // Output |
||
44 | $outputClassName = 'Groundskeeper\\Output\\' . |
||
45 | 10 | ucfirst($this->configuration->get('output')); |
|
46 | 10 | $output = new $outputClassName($this->configuration); |
|
47 | |||
48 | 10 | return $output->printTokens($tokens); |
|
49 | } |
||
50 | |||
56 |