src/Tokens/Elements/Meta.php 1 location
|
@@ 29-36 (lines=8) @@
|
| 26 |
|
); |
| 27 |
|
} |
| 28 |
|
|
| 29 |
|
protected function fixSelf(LoggerInterface $logger) |
| 30 |
|
{ |
| 31 |
|
// "name" attribute requires "content" attribute. |
| 32 |
|
if ($this->hasAttribute('name') && !$this->hasAttribute('content')) { |
| 33 |
|
$logger->debug('Modifying ' . $this . '. A "meta" element with a "name" attribute requires a "content" attribute. Adding empty "content" attribute.'); |
| 34 |
|
$this->addAttribute('content', ''); |
| 35 |
|
} |
| 36 |
|
} |
| 37 |
|
|
| 38 |
|
protected function removeInvalidSelf(LoggerInterface $logger) |
| 39 |
|
{ |
src/Tokens/Elements/A.php 1 location
|
@@ 41-49 (lines=9) @@
|
| 38 |
|
); |
| 39 |
|
} |
| 40 |
|
|
| 41 |
|
protected function fixSelf(LoggerInterface $logger) |
| 42 |
|
{ |
| 43 |
|
// If the "itemprop" attribute is specified on an "a" element, then |
| 44 |
|
// the "href" attribute must also be specified. |
| 45 |
|
if ($this->hasAttribute('itemprop') && !$this->hasAttribute('href')) { |
| 46 |
|
$logger->debug($this . ' with "itemprop" attribute requires the "href" attribute also. Adding empty "href" attribute.'); |
| 47 |
|
$this->addAttribute('href', ''); |
| 48 |
|
} |
| 49 |
|
} |
| 50 |
|
|
| 51 |
|
protected function removeInvalidChildren(LoggerInterface $logger) |
| 52 |
|
{ |
src/Tokens/Elements/Menu.php 1 location
|
@@ 34-40 (lines=7) @@
|
| 31 |
|
); |
| 32 |
|
} |
| 33 |
|
|
| 34 |
|
protected function fixSelf(LoggerInterface $logger) |
| 35 |
|
{ |
| 36 |
|
if (!$this->hasAttribute('type')) { |
| 37 |
|
$logger->debug('Modifying ' . $this . '. Adding the default "type" attribute for the "menu" element.'); |
| 38 |
|
$this->addAttribute('type', 'context'); |
| 39 |
|
} |
| 40 |
|
} |
| 41 |
|
|
| 42 |
|
protected function removeInvalidChildren(LoggerInterface $logger) |
| 43 |
|
{ |