Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| ColGroupContentRule | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
12 | |
0.00% |
0 / 1 |
| test | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
12 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace pvc\html\rules\content_rules\permitted; |
| 4 | |
| 5 | use pvc\html\rules\AbstractRule; |
| 6 | use pvc\interfaces\html\content_model\ContentPermission; |
| 7 | use pvc\interfaces\html\dom\DomNodeInterface; |
| 8 | use pvc\interfaces\html\rules\ContentRuleInterface; |
| 9 | |
| 10 | class ColGroupContentRule extends AbstractRule implements ContentRuleInterface |
| 11 | { |
| 12 | public function test(DomNodeInterface $content): ContentPermission |
| 13 | { |
| 14 | return (!$content->getDomElement()->hasAttribute('span') && $content->getDomElement()->hasName('col')) ? |
| 15 | ContentPermission::GRANTED : |
| 16 | ContentPermission::NOT_APPLICABLE; |
| 17 | } |
| 18 | } |