| Conditions | 5 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | 2 | protected function removeInvalidChildren(LoggerInterface $logger) |
|
| 34 | { |
||
| 35 | // Only "li" and ScriptSupporting elements allowed. |
||
| 36 | 2 | foreach ($this->children as $child) { |
|
| 37 | 2 | if ($child instanceof NonParticipating || |
|
| 38 | 2 | $child instanceof Li || |
|
| 39 | 2 | $child instanceof ScriptSupporting) { |
|
| 40 | 2 | continue; |
|
| 41 | } |
||
| 42 | |||
| 43 | 1 | $logger->debug('Removing ' . $child . '. Only elements "li" and script supporting elements allowed as children of "ol" element.'); |
|
| 44 | 1 | $this->removeChild($child); |
|
| 45 | } |
||
| 46 | 2 | } |
|
| 47 | } |
||
| 48 |