| Conditions | 4 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 3 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 18 | 4 | public function clean(LoggerInterface $logger) |
|
| 19 | { |
||
| 20 | 4 | if ($this->configuration->get('clean-strategy') == Configuration::CLEAN_STRATEGY_NONE || $this->configuration->get('clean-strategy') == Configuration::CLEAN_STRATEGY_LENIENT) { |
|
| 21 | 4 | return true; |
|
| 22 | } |
||
| 23 | |||
| 24 | // DocType must not have any parent elements. |
||
| 25 | 3 | $result = $this->getParent() === null; |
|
| 26 | 3 | if (!$result) { |
|
| 27 | 1 | $logger->debug('Removing ' . $this . '. DocType cannot be a child of any element.'); |
|
| 28 | 1 | } |
|
| 29 | |||
| 30 | 3 | return $result; |
|
| 31 | } |
||
| 32 | |||
| 41 |