| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 87 | public function render(Node $node, ChildNodeRendererInterface $childRenderer) |
|
| 33 | { |
||
| 34 | 87 | if (! $node instanceof TableCell) { |
|
| 35 | 3 | throw new \InvalidArgumentException('Incompatible node type: ' . \get_class($node)); |
|
| 36 | } |
||
| 37 | |||
| 38 | 84 | $attrs = $node->data->get('attributes'); |
|
| 39 | |||
| 40 | 84 | if ($node->getAlign() !== null) { |
|
| 41 | 18 | $attrs['align'] = $node->getAlign(); |
|
| 42 | } |
||
| 43 | |||
| 44 | 84 | return new HtmlElement($node->getType(), $attrs, $childRenderer->renderNodes($node->children())); |
|
| 45 | } |
||
| 47 |