Conditions | 6 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 6 |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
19 | 2 | protected function removeInvalidChildren(LoggerInterface $logger) |
|
20 | { |
||
21 | // Only "dd", "dt", and ScriptSupporting elements allowed. |
||
22 | 2 | foreach ($this->children as $child) { |
|
23 | 2 | if ($child instanceof NonParticipating || |
|
24 | 2 | $child instanceof Dd || |
|
25 | 2 | $child instanceof Dt || |
|
26 | 2 | $child instanceof ScriptSupporting) { |
|
27 | 2 | continue; |
|
28 | } |
||
29 | |||
30 | 1 | $logger->debug('Removing ' . $child . '. Only elements "dd", "dt", and script supporting elements allowed as children of "dl" element.'); |
|
31 | 1 | $this->removeChild($child); |
|
32 | 2 | } |
|
33 | 2 | } |
|
34 | } |
||
35 |