src/Tokens/Elements/Body.php 1 location
|
@@ 44-56 (lines=13) @@
|
41 |
|
); |
42 |
|
} |
43 |
|
|
44 |
|
protected function removeInvalidSelf(LoggerInterface $logger) |
45 |
|
{ |
46 |
|
// "body" element must be a child of "html" element. |
47 |
|
if ($this->getParent() !== null && |
48 |
|
$this->getParent()->getType() === Token::ELEMENT && |
49 |
|
$this->getParent()->getName() != 'html') { |
50 |
|
$logger->debug($this . ' must be a child of "html" element.'); |
51 |
|
|
52 |
|
return true; |
53 |
|
} |
54 |
|
|
55 |
|
return false; |
56 |
|
} |
57 |
|
|
58 |
|
protected function doClean(LoggerInterface $logger) |
59 |
|
{ |
src/Tokens/Elements/Head.php 1 location
|
@@ 77-89 (lines=13) @@
|
74 |
|
} |
75 |
|
} |
76 |
|
|
77 |
|
protected function removeInvalidSelf(LoggerInterface $logger) |
78 |
|
{ |
79 |
|
// "head" element must be a child of "html" element. |
80 |
|
if ($this->getParent() !== null && |
81 |
|
$this->getParent()->getType() === Token::ELEMENT && |
82 |
|
$this->getParent()->getName() != 'html') { |
83 |
|
$logger->debug($this . ' must be a child of "html" element.'); |
84 |
|
|
85 |
|
return true; |
86 |
|
} |
87 |
|
|
88 |
|
return false; |
89 |
|
} |
90 |
|
} |
91 |
|
|