| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | 12 | public function render(AbstractInline $inline, ElementRendererInterface $htmlRenderer) |
|
| 28 | { |
||
| 29 | 12 | if (!($inline instanceof TaskListItemMarker)) { |
|
| 30 | 3 | throw new \InvalidArgumentException('Incompatible inline type: ' . \get_class($inline)); |
|
| 31 | } |
||
| 32 | |||
| 33 | 9 | $checkbox = new HtmlElement('input', ['disabled' => '', 'type' => 'checkbox'], '', true); |
|
| 34 | |||
| 35 | 9 | if ($inline->isChecked()) { |
|
| 36 | 6 | $checkbox->setAttribute('checked', ''); |
|
| 37 | } |
||
| 38 | |||
| 39 | 9 | return $checkbox; |
|
| 40 | } |
||
| 41 | } |
||
| 42 |