Conditions | 4 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4.25 |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
32 | 2 | protected function removeInvalidSelf(LoggerInterface $logger) |
|
33 | { |
||
34 | // Must be child of "object" element. |
||
35 | 2 | $parent = $this->getParent(); |
|
36 | 2 | if ($parent !== null && |
|
37 | 2 | $parent instanceof Video && |
|
38 | 2 | $parent instanceof Audio) { |
|
39 | $logger->debug('Removing ' . $this . '. Must be a child of "video" or "audio" element.'); |
||
40 | |||
41 | return true; |
||
42 | } |
||
43 | |||
44 | 2 | return false; |
|
45 | } |
||
46 | } |
||
47 |