| Conditions | 4 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | protected function removeInvalidSelf(LoggerInterface $logger) |
||
| 34 | { |
||
| 35 | // Child of "picture" element. |
||
| 36 | // Child of media element. |
||
| 37 | $parent = $this->getParent(); |
||
| 38 | if ($parent !== null && |
||
| 39 | $parent->getName() != 'picture' && |
||
| 40 | !$parent instanceof MediaElement) { |
||
| 41 | $logger->debug($this . ' must be a child of "picture" element or a media element.'); |
||
| 42 | |||
| 43 | return true; |
||
| 44 | } |
||
| 45 | |||
| 46 | return false; |
||
| 47 | } |
||
| 48 | } |
||
| 49 |