Conditions | 5 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 17 |
Ratio | 100 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
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 |